-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add flag to enable "hybrid" regex mode #1155
Labels
enhancement
An enhancement to the functionality of the software.
Comments
BurntSushi
added a commit
that referenced
this issue
Apr 14, 2019
This flag, when set, will automatically dispatch to PCRE2 if the given regex cannot be compiled by Rust's regex engine. If both engines fail to compile the regex, then both errors are surfaced. Closes #1155
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In some cases, it would be nice for ripgrep to use Rust's regex engine by default whenever possible, and then fall back to PCRE2 when "advanced" regex features are used. In terms of user level documentation, I might suggest this specification:
I had initially thought about adding this when I added PCRE2, since it's a somewhat logical addition. However, I held off because I wanted a real use case first. One such use case is here: microsoft/vscode#64606
In terms of implementation, we should add debug logs indicating which regex engine is being used and any compilation errors that are otherwise suppressed in normal output.
cc @roblourens
The text was updated successfully, but these errors were encountered: