GNU bug report logs -
#74065
documentation suggestion for caret
Previous Next
To reply to this bug, email your comments to 74065 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-sed <at> gnu.org
:
bug#74065
; Package
sed
.
(Mon, 28 Oct 2024 16:15:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Greg Minshall <minshall <at> umich.edu>
:
New bug report received and forwarded. Copy sent to
bug-sed <at> gnu.org
.
(Mon, 28 Oct 2024 16:15:02 GMT)
Full text and
rfc822 format available.
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 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.