4 ms·
PCRE suffers from worst case exponential behavior, so it's not suitable for all tasks. For the most part, the syntax supported by ripgrep is a strict subset of
by burntsushi 10y ago
PCRE suffers from worst case exponential behavior, so it's not suitable for all tasks.
For the most part, the syntax supported by ripgrep is a strict subset of the syntax supported by PCRE.
But yes, I can agree that supporting PCRE can be considered an advantage if you use advanced features heavily (backreferences and lookaround come to mind).
- db48x 10y agoMeh. Back-references and lookaround both take too much brainpower to use at an interactive shell. I've used them few times in programs that I was writing, but just to find some text in some files on my disk? Never.