changeset 74845:5fffe049d3bf

(Regexp Search): Explain why forward and reverse regexp search are not mirror images.
author Richard M. Stallman <rms@gnu.org>
date Sat, 23 Dec 2006 17:30:03 +0000
parents 2cd58794c743
children 6bc0603419f7
files man/search.texi
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/man/search.texi	Sat Dec 23 10:29:59 2006 +0000
+++ b/man/search.texi	Sat Dec 23 17:30:03 2006 +0000
@@ -488,6 +488,13 @@
 you have searched for @samp{foo} and you add @samp{\|bar}, the cursor
 backs up in case the first @samp{bar} precedes the first @samp{foo}.
 
+  Forward and backward regexp search are not symmetrical, because
+regexp matching in Emacs always operates forward, starting with the
+beginning of the regexp.  Thus, forward regexp search scans forward,
+trying a forward match at each possible starting position.  Backward
+regexp search scans backward, trying a forward match at each possible
+starting position.  These search methods are not mirror images.
+
 @findex re-search-forward
 @findex re-search-backward
   Nonincremental search for a regexp is done by the functions