3 ms·
Not a single other implementation has feature-parity with Perl. Perl regexes are not only Turing-complete, but can also execute arbitrary code¹ as part of the r
by ankitpati 4y ago
Not a single other implementation has feature-parity with Perl. Perl regexes are not only Turing-complete, but can also execute arbitrary code¹ as part of the regex evaluation.
PCRE is the pinnacle of deceptive advertising. It is emphatically not Perl-Compatible.
Source: I used to write Perl for a living, and I have battle scars from (¹) above.
- macintux 4y agoWhen Sun released Java and went on a marketing road show, I drove to Chicago to hear the presentation. Since Perl was my favorite language, I had to ask about regular expression support; the Sun engineer said there wasn’t any, but I could build the first library. To me, it was inconceivable that you could release a major language and not only not have regular expressions built into the language like Perl, but not even have it in the standard library. Crazy.
- burntsushi 4y agoWe did the same thing for Rust. Regexes are neither in the language nor in the standard library. Go doesn't have them in the language either (although they're in the standard library).
- macintux 4y agoRust wasn’t trying to become the standard web programming language.
- burntsushi 4y agoI didn't realize that was a necessary precondition in your evaluation of what makes something "crazy." Sorry.
- macintux 4y agoSorry, early morning. I should have been more verbose. Rust has a different target problem space, a different standard library philosophy, a package management system, and exists in a world where adding external dependencies is trivial. Java didn’t have any of those excuses.
- oblio 4y agoWell, Java turned out quite all right on that front :-)
- latchkey 4y agoWhen I found out that Jonathan Locke had even a minimal Java implementation of a regex engine, I jumped on it and messaged him to open source it to the Jakarta project. Crazy that that was 20 years ago... https://jakarta.apache.org/regexp/changes.html https://jakarta.apache.org/regexp/changes.html