]> git.eshelyaron.com Git - emacs.git/commitdiff
Clarify about POSIX functions and non-greedy repetition operators.
authorRichard M. Stallman <rms@gnu.org>
Mon, 24 Feb 2003 16:47:27 +0000 (16:47 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 24 Feb 2003 16:47:27 +0000 (16:47 +0000)
lispref/searching.texi

index 59c5a7fb16acdb20b96a9faca76babba16533be7..82f380b18edf3b148bc5d155449b6940b5294392 100644 (file)
@@ -483,9 +483,9 @@ but no other string.@refill
 surrounding @samp{\( @dots{} \)} grouping can limit the grouping power of
 @samp{\|}.@refill
 
-Full backtracking capability exists to handle multiple uses of
-@samp{\|}, if you use the POSIX regular expression functions
-(@pxref{POSIX Regexps}).
+If you need full backtracking capability to handle multiple uses of
+@samp{\|}, use the POSIX regular expression functions (@pxref{POSIX
+Regexps}).
 
 @item \@{@var{m}\@}
 is a postfix operator that repeats the previous pattern exactly @var{m}
@@ -959,6 +959,10 @@ possibilities and found all matches, so they can report the longest
 match, as required by POSIX.  This is much slower, so use these
 functions only when you really need the longest match.
 
+  The POSIX search and match functions do not properly support the
+non-greedy repetition operators.  This is because POSIX backtracking
+conflicts with the semantics of non-greedy repetition.
+
 @defun posix-search-forward regexp &optional limit noerror repeat
 This is like @code{re-search-forward} except that it performs the full
 backtracking specified by the POSIX standard for regular expression