2 ms·
> Obligatory comment: Nowadays nearly nothing uses actually "regular" regexes This is only partially true: while most people use implementations which support
by acdha 13y ago
> Obligatory comment: Nowadays nearly nothing uses actually "regular" regexes
This is only partially true: while most people use implementations which support back references, it's likely that a significant percentage of regular expressions actually executed do not use that complexity. Given the widespread use of regular expressions for input validation, log-file analysis, URL dispatching in web frameworks, etc. there's a fair chance that a majority of the regular expressions executed would benefit from this approach, particularly since it would be trivial for an engine to transparently fall down to the current implementation when it encounters a complex construct.
- nikic 13y agoNot disagreeing there. Fast NFA implementations are very nice for matching the regular subset and falling back to a more general algorithm for the non-regular cases :)