From 40d0bf851f6530f632d490bf9e08a7f958d4f073 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 4 Mar 2004 17:25:34 +0000 Subject: (Regexps): Explain that ^ and $ have their special meanings only in certain contexts. --- man/search.texi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man/search.texi b/man/search.texi index ef2d577623..303074dcf0 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. -- cgit v1.2.3