[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#74065: documentation suggestion for caret
From: |
Greg Minshall |
Subject: |
bug#74065: 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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#74065: documentation suggestion for caret,
Greg Minshall <=