News for hackers. Stuff that matters.
Re:RE#: high performance derivative-based regex matching wit... by HelloNurse on Friday July 25, 2025 @05:40AM (#44681347)
This is a broken regexp, with deliberate ambiguity: nondeterministically choosing the groups according to one of several matching alternatives is an implementation-defined ambiguity "resolution" that should not happen.

Just write /(a)b/ or /a(b)/ or /ab/ or /(ab)/ or /(a)(b)/ which mean five slightly different things.

Re:RE#: high performance derivative-based regex matching wit... by o11c on Friday July 25, 2025 @12:49PM (#44685259)
It's called a minimal example. You can easily get nontrivial real-world versions, such as "All vowels or all uppercase" or "Three letters, at least two of which are A's".

It is not reasonable to expect the user to manually disambiguate every regex.