Re:The quadratic problem nobody fixed
by gpvos on Monday March 23, 2026 @06:07PM
(#47495808)
I find it weird to have the Perl innovation (?:...) be called "traditional regex". Perl was rather innovative back then, even if it's more than 30 years ago now. Traditional regex is what came before it (grep -E being the most advanced form). I wonder what counts as nontraditional in the author's eyes.
[ Parent
| on HN ]
In my head a regex-like thing of Perl origin is known as a 'perlex'.
Re:The quadratic problem nobody fixed
by MathMonkeyMan on Monday March 23, 2026 @09:48PM
(#47497720)
can call it PCRE now
'PCRE' never really caught on broadly, unfortunately.
It seems that Boost actually uses 'perlex' https://www.boost.org/doc/libs/1_31_0/libs/regex/doc/syntax_... .
Haha, you're right about that. I was looking for another word for "default"
>even if it's more than 30 years ago now.
Here's your answer.
>Traditional regex is what came before it
No, that's "ancient regex".
> No, that's "ancient regex".
wouldn't the "ancient regex" be the ed "g/re/p" version?
-E, --extended-regexp
Interpret PATTERNS as extended regular expressions (EREs, see below).
-G, --basic-regexp
Interpret PATTERNS as basic regular expressions (BREs, see below). This is the default.
-P, --perl-regexp
Interpret I<PATTERNS> as Perl-compatible regular expressions (PCREs). This option is experimental when combined with the -z (--null-data) option, and grep -P may warn of unimplemented features.
From the manpage it seems my grep make distinction between "Extended" "Basic" and "Perl" regexes.