GNU bug report logs -
#74065
documentation suggestion for caret
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
in the info node
----
5.3 Overview of basic regular expression syntax
----
in the discussion of caret (^), there is this (totally correct, afaik)
text:
----
‘^’ acts as a special character only at the beginning of the
regular expression or subexpression (that is, after ‘\(’ or ‘\|’).
Portable scripts should avoid ‘^’ at the beginning of a
subexpression, though, as POSIX allows implementations that treat
‘^’ as an ordinary character in that context.
----
on the other hand, POSIX *EREs* allow caret in a subexpression. this
isn't mentioned in the info node about EREs (which, as that node treats
GNU sed EREs, probably needn't be). would it be worth mentioning it
here?
----
‘^’ acts as a special character only at the beginning of the
regular expression or subexpression (that is, after ‘\(’ or ‘\|’).
Portable scripts should avoid ‘^’ at the beginning of a
subexpression, though, as POSIX allows implementations that treat
‘^’ as an ordinary character in that context. (Note that POSIX
*extended* regular expressions, as well as those of GNU sed, do
allow '^' at the beginning of a subexpression.)
----
cheers.
This bug report was last modified 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.