Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Variables and comments seem nice.

Insignificant whitespace is needed to support it, and as an added bonus it would make it easier to break up patterns across multiple lines.

The syntax changes and added verbosity do not seem great, though. They'd trip me up for sure.

In general, I think I'd like to see a language more like "Regex 2.0", ie. an extension that doesn't depart too far from what we're used to.



While a language like Raku (formerly known as Perl 6) is unlikely to catch up in the current landscape, it did bring a lot of improvements to regular expressions (link to section that starts to use interesting examples [1]).

Way back somewhere in the 2010s when I was still keeping an eye on Perl 6, I was kind of hoping that all these improvements would make their way into some kind of PCRE v3 that all other tools that already use PCRE would switch to. Would have been nice.

[1] https://docs.raku.org/language/regexes#Alternation:_||


(?x) mode in regexes does comments / whitespace / multiple lines.

+1 to the syntax




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: