From 01913af25f11d27061fb1942cf03977789647267 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 24 Feb 2003 16:47:27 +0000 Subject: [PATCH] Clarify about POSIX functions and non-greedy repetition operators. --- lispref/searching.texi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lispref/searching.texi b/lispref/searching.texi index 59c5a7fb16a..82f380b18ed 100644 --- a/lispref/searching.texi +++ b/lispref/searching.texi @@ -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 -- 2.39.2