@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 positiong 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