Next: string-match, Up: Regular Expression Searching in Programs [Index]
This function searches forward in the current buffer for a string of text that is matched by the regular expression REGEXP. The function skips over any amount of text that is not matched by REGEXP, and leaves point at the end of the first match found. It returns the new value of point.
The regexp to match against
The upper bound to the search, unless nil
What ‘re-search-forward’ does when the search fails depends on the value of NOERROR:
Signal a ‘search-failed’ error.
Do nothing and return ‘nil’.
Move point to LIMIT (or the end of the accessible portion of the buffer) and return ‘nil’.
If COUNT is positive number, N, search N times. If all searches succeed, function call succeeds, moves point and return point’s new value. Otherwise, function call fails.
If COUNT is a negative number -N, the search is done N times in the backward direction.
Upon success, the value of point; nil on failure.