
On 2022-02-16 02:11, Chris Angelico wrote:
On Wed, 16 Feb 2022 at 12:56, Tim Peters <tim.peters@gmail.com> wrote:
Regexps keep "evolving"...
Once upon a time, a "regular expression" was a regular grammar. That is no longer the case.
Once upon a time, a regular expression could be broadly compatible with multiple different parser engines. That is being constantly eroded.
So far, I think they still count as expressions. That's about all we can depend on.
Is there any sort of standardization of regexp syntax and semantics, or does everyone just extend it in their own directions, borrowing ideas from each other to give some not-always-false assurance of compatibility?
The only regex standard I know of is the POSIX standard, but I don't know of a common implementation that follows it. Most tend to follow Perl, although Perl borrowed named groups from Python, though with a slightly different syntax ("(?<name>...)" instead of "(?P<name>...)").