3 ms·
Many of those gains can be had by using first-class and more full-featured regexes, like those that that are available in other languages (Ruby, Perl): - escap
by TimTheTinker 6y ago
Many of those gains can be had by using first-class and more full-featured regexes, like those that that are available in other languages (Ruby, Perl):
- escaping hell isn't that much of a problem, since you're only ever escaping something once (not like a regex in a string)
- several languages support separating regexes across several lines
- regex commenting (including named groups) is a standard feature in many languages, and that's besides using first-class comments across multiple lines
I think you do have a point about digraphs (or homographs), but unless I misunderstand, those would be a problem whether or not the character(s) are part of a string vs. a first-class regex. As for unambiguous human-readable names for regex features used, tools like this (https://regexr.com/ https://regexr.com/) are available and very effective.
I might prefer Java Verbal Expressions over java.util.regex, but to me that's more of a knock on Java and its lack of proper, first-class regexes than anything else.