Function: match-end

match-end is a function defined in search.c.

Signature

(match-end SUBEXP)

Documentation

Return position of end of text matched by last search.

SUBEXP, a number, specifies which parenthesized expression in the last
  regexp.
Value is nil if SUBEXPth pair didn't match, or there were less than
  SUBEXP pairs.
Zero means the entire text matched by the whole regexp or whole string.

Return value is undefined if the last search failed.

Other relevant functions are documented in the regexp group.

Probably introduced at or before Emacs version 17.

Shortdoc

;; regexp
(match-end 1)
    e.g. => 3

Aliases

pcomplete-match-end

Source Code

// Defined in /usr/src/emacs/src/search.c
{
  return match_limit (subexp, 0);
}