diff options
author | Richard M. Stallman <rms@gnu.org> | 2006-12-23 17:30:42 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2006-12-23 17:30:42 +0000 |
commit | d1549d4e6d0ae99d6540b62e1579414d7b732750 (patch) | |
tree | 6f2d3ca6d12b33bbf15cebd5c44a2b8686ec7170 /man/search.texi | |
parent | fa1f0a88f9209186c4a9ccb6edaacb8264d9535b (diff) | |
download | emacs-d1549d4e6d0ae99d6540b62e1579414d7b732750.tar.gz |
(Regexp Search): Explain why forward and reverse regexp
search are not mirror images.
Diffstat (limited to 'man/search.texi')
-rw-r--r-- | man/search.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/man/search.texi b/man/search.texi index 67b61aeac07..532d58fb9d8 100644 --- a/man/search.texi +++ b/man/search.texi @@ -488,6 +488,13 @@ search can make the cursor move back and start again. For example, if 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 |