-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
[feature] consider using fancy-regex to support look-around and backtracking #763
Comments
Hi, thanks for the suggestion. fancy-regex looks like not as mature as regex. I would await more feedback and benchmarks about fancy-regex for its integration. |
From fancy-regex's README
The status was committed 7 years ago, telling from git blame... Looking at its issue list, I can see these opening bugs:
I sincerely don't think fancy-regex is production-ready now. |
Well, you could get feedback and benchmarks in the most important use case - AST-grepping - by adding that as an optional engine :) Though from my "searching end user" perspective the issues linked are dwarfed by the lack of look-ahead and back-references, those I use often in alternative engines, and it's a big limitation of the "production ready" Rust's default one (even if the back-references,bugs in cases like |
@eugenesvk Would you like to give me an example where you have to use lookaround operator? That will help me understand your use case. Also, you can use JS API or Python API if lookahead/lookbehind is critical for you. |
⭐ Suggestion
Currently ast-grep regex support is missing a couple of features
However, there is this fancy regex crate that implements "look-around and backtracking" https://github.com/fancy-regex/fancy-regex, so it might be better to use that instead of the default regex
💻 Use Cases
Same use cases where you'd use regex, but richer and allowing for better matches
The text was updated successfully, but these errors were encountered: