GNU bug report logs - #74065
documentation suggestion for caret

Previous Next

Package: sed;

Reported by: Greg Minshall <minshall <at> umich.edu>

Date: Mon, 28 Oct 2024 16:15:01 UTC

Severity: normal

To reply to this bug, email your comments to 74065 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


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):

From: Greg Minshall <minshall <at> umich.edu>
To: bug-sed <at> gnu.org
Subject: documentation suggestion for caret
Date: Mon, 28 Oct 2024 09:13:34 -0700
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.