3 ms·
If you need a regex that complicated it’s probably better to be written as a parser. Not only will it be way more performant, it will be much more maintainable.
by alharith 7y ago
If you need a regex that complicated it’s probably better to be written as a parser. Not only will it be way more performant, it will be much more maintainable.
- leoh 7y agoI agree that if you're designing a system from scratch this makes sense. Ocassionally you need to extend the syntax of an existing system that is written with regular expressions and would require a negative lookahead. Some sub-parser with negative lookahead functionality would be possible, but a regex would be more convenient in a pinch.