3 ms·
Every time you write a non trivial regex! Regexes often contain complex parts that repeat themselves throughout the regex or can be combined into higher level
by nyellin 4y ago
Every time you write a non trivial regex!
Regexes often contain complex parts that repeat themselves throughout the regex or can be combined into higher level patterns. This adds support for that.
- chii 4y ago> Regexes often contain complex parts that repeat themselves throughout the regex or can be combined into higher level patterns. sounds like a parser use case.
- xdfgh1112 4y agoOne of the coolest things about Raku/Perl6 was how it made grammars a first-class citizen, like how Perl 5 made regexes a first-class citizen.
- asicsp 4y agoIf supported, you can use verbose flag and subexpression calls for such cases. From a cursory glance, I found only the numeric `range` support the standout feature I'd want in existing regex support.
- Diris 4y agoThat reminds me of that nice article about how to do that kind of thing in python [0] The unreasonable effectiveness of f-strings and re.verbose https://news.ycombinator.com/item?id=31457188 https://news.ycombinator.com/item?id=31457188
- bmn__ 4y agoYou make it sound as if regex don't have this ability, but they already do.