From: Richard M. Stallman Date: Thu, 4 Mar 2004 17:25:34 +0000 (+0000) Subject: (Regexps): Explain that ^ and $ have their X-Git-Tag: ttn-vms-21-2-B4~7350 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=40d0bf851f6530f632d490bf9e08a7f958d4f073;p=emacs.git (Regexps): Explain that ^ and $ have their special meanings only in certain contexts. --- diff --git a/man/search.texi b/man/search.texi index ef2d5776232..303074dcf0d 100644 --- a/man/search.texi +++ b/man/search.texi @@ -576,10 +576,18 @@ beginning of a line in the text being matched. Otherwise it fails to 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.