# HG changeset patch # User Richard M. Stallman # Date 1078421134 0 # Node ID d46dec53348020bc51df34f664c449e9e7118429 # Parent 3fd0ea9feede496d297bf549766a13885554cb54 (Regexps): Explain that ^ and $ have their special meanings only in certain contexts. diff -r 3fd0ea9feede -r d46dec533480 man/search.texi --- 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.