Mercurial > emacs
changeset 54273:d46dec533480
(Regexps): Explain that ^ and $ have their
special meanings only in certain contexts.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 04 Mar 2004 17:25:34 +0000 |
parents | 3fd0ea9feede |
children | d41dd3d19ce4 |
files | man/search.texi |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/man/search.texi Thu Mar 04 17:24:23 2004 +0000 +++ b/man/search.texi Thu Mar 04 17:25:34 2004 +0000 @@ -576,10 +576,18 @@ match anything. Thus, @samp{^foo} matches a @samp{foo} that occurs at the beginning of a line. +For historical compatibility reasons, @samp{^} can be used with this +meaning only at the beginning of the regular expression, or after +@samp{\(} or @samp{\|}. + @item @kbd{$} is similar to @samp{^} but matches only at the end of a line. Thus, @samp{x+$} matches a string of one @samp{x} or more at the end of a line. +For historical compatibility reasons, @samp{$} can be used with this +meaning only at the end of the regular expression, or before @samp{\)} +or @samp{\|}. + @item @kbd{\} has two functions: it quotes the special characters (including @samp{\}), and it introduces additional special constructs.