3 ms·
Simple regexes are still fairly readable (e.g. a three number version string match), but if you find yourself having to worry about stuff like matching within e
by stormbeta 11y ago
Simple regexes are still fairly readable (e.g. a three number version string match), but if you find yourself having to worry about stuff like matching within escapable delimiters, it's time to put the regexes down and pick a different solution.
- Retra 11y agoMatching within escapable delimiters is not too hard. For instance this will match C-style escaped strings: "(\.|[^"])*" You just won't be able to nest them. You're either in a string or you aren't. You're never in a string inside another string.