Summary: | awk: syntax error in regular expression $^ | ||
---|---|---|---|
Product: | Base System | Reporter: | Kevin Locke <kevin> |
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | New --- | ||
Severity: | Affects Only Me | CC: | pat, pprocacci |
Priority: | --- | ||
Version: | 13.0-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
Kevin Locke
2022-04-23 00:41:40 UTC
The syntax you provided is syntactically correct, however the result of such a match is undefined. An argument could be made that '$^' should parse without error, to which I actually agree as that follows the grammar as posted by you, but I don't see how '$^' is useful. If it's working elsewhere, it's working within that 'undefined behavior' realm which could change the moment POSIX actually defines $^ as having an actual meaning. As of right now, it doesn't. Perhaps you could say, it means 'end of line' then 'newline' but that doesn't really make sense because you could anchor on either just a newline or end of line. Those are my thoughts anyways. |