@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001,
-@c 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../../info/searching
@node Searching and Matching, Syntax Tables, Non-ASCII Characters, Top
@end defun
@defun string-match-p regexp string &optional start
-This predicate function does what @code{string-match} does, but it has
-no side effect of modifying the match data.
+This predicate function does what @code{string-match} does, but it
+avoids modifying the match data.
@end defun
@defun looking-at regexp
@end example
@end defun
-@defun looking-back regexp &optional limit
+@defun looking-back regexp &optional limit greedy
This function returns @code{t} if @var{regexp} matches text before
point, ending at point, and @code{nil} otherwise.
not to search before @var{limit}. In this case, the match that is
found must begin at or after @var{limit}.
+If @var{greedy} is non-@code{nil}, this function extends the match
+backwards as far as possible, stopping when a single additional
+previous character cannot be part of a match for regexp. When the
+match is extended, its starting position is allowed to occur before
+@var{limit}.
+
@example
@group
---------- Buffer: foo ----------
(re-search-forward "The \\(cat \\)")
(match-beginning 0)
(match-beginning 1))
- @result{} (9 9 13)
+ @result{} (17 9 13)
@end group
@group