4 ms·
> Only supporting DFA-able Rust regexes. I'd love to use a lighter-weight regex library in ag, but users are accustomed to full PCRE support Would it be possib
by mintplant 10y ago
> Only supporting DFA-able Rust regexes. I'd love to use a lighter-weight regex library in ag, but users are accustomed to full PCRE support
Would it be possible to detect when an expression requires PCRE-specific features and use a different engine when possible?
- ggreer 10y agoIt's possible, but it's certainly not easy. Here are some complications: 1. The DFA-regex engine's syntax must be a subset of PCRE's syntax. If it's not, then users will be very confused when regex features work fine in isolation, but cause errors when combined in the same query. 2. The DFA-regex's behavior must be the same as PCRE. If whitespace matching or unicode support is even slightly different, it will frustrate users. 3. Adding another dependency means yet another way in which compilation can fail or incompatibilities can arise. Considering the marginal usefulness of backtracking and captures, I'd prefer to keep ag as simple as possible and ditch them.
- deleted 10y ago[deleted]