[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lispref/searching.texi,v
From: |
Karl Berry |
Subject: |
[Emacs-diffs] Changes to emacs/lispref/searching.texi,v |
Date: |
Wed, 11 Apr 2007 16:27:36 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Karl Berry <karl> 07/04/11 16:27:33
Index: searching.texi
===================================================================
RCS file: /sources/emacs/emacs/lispref/searching.texi,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- searching.texi 7 Apr 2007 01:44:01 -0000 1.80
+++ searching.texi 11 Apr 2007 16:27:33 -0000 1.81
@@ -309,17 +309,16 @@
The next alternative is for @samp{a*} to match only two @samp{a}s. With
this choice, the rest of the regexp matches successfully.
address@hidden:} Nested repetition operators take a long time,
-or even forever, if they
-lead to ambiguous matching. For example, trying to match the regular
-expression @samp{\(x+y*\)*a} against the string
address@hidden could take hours before it
-ultimately fails. Emacs must try each way of grouping the 35
address@hidden before concluding that none of them can work. Even worse,
address@hidden(x*\)*} can match the null string in infinitely many ways, so
-it causes an infinite loop. To avoid these problems, check nested
-repetitions carefully, to make sure that they do not cause combinatorial
-explosions in backtracking.
address@hidden:} Nested repetition operators can run for an
+indefinitely long time, if they lead to ambiguous matching. For
+example, trying to match the regular expression @samp{\(x+y*\)*a}
+against the string @samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz} could
+take hours before it ultimately fails. Emacs must try each way of
+grouping the @samp{x}s before concluding that none of them can work.
+Even worse, @samp{\(x*\)*} can match the null string in infinitely
+many ways, so it causes an infinite loop. To avoid these problems,
+check nested repetitions carefully, to make sure that they do not
+cause combinatorial explosions in backtracking.
@item @samp{+}
@cindex @samp{+} in regexp