PCRE2Project / pcre2

PCRE2 development is now based here.
Other
917 stars 191 forks source link

pcre2grep: add $& as an alias for $0 #519

Closed carenas closed 1 month ago

carenas commented 1 month ago

Make pcre2grep consistent with recent changes on the syntax used to refer to the matched text and that reflect recent Perl as well.

While at it, update the documentation and other somehow unrelated minor changes.

PhilipHazel commented 1 month ago

The documentation pcre2grep.1 needs the addition of $& to the section describing --output. This is a minor backwards incompatibility because previously $& would have inserted &.

carenas commented 1 month ago

& would have inserted &.

I couldn't find that in my sources, so generated the other files and inspected them by hand, so hopefully this is not an issue