-
-
Notifications
You must be signed in to change notification settings - Fork 845
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
Support PCRE (look behind) #399
Comments
Thank you for the feedback. Could you please provide a few examples where advanced regex features like lookbehind could be useful in a realistic |
I can't think of any examples off the top of my head but the use case I was going for was the negative lookaheads/behinds. They are pretty awkward to express without lookbehinds. |
I think I am going to have to decline (for now).
|
A use case is finding all file which don't match an extension, ei: |
This use case can also be solved with
For example: search for all files matching the
That's (arguably) also more readable than the lookbehind. |
@sharkdp |
the -E exclude thing definitely slipped past me on the first few tries to solve this. Compared to wishing I had a negative lookbehind... having a quick "exclude" glob seems so much nicer. it's possible this could be phrased better in the readme as "find all files not matching x" is a use case of it, not just "ignore" :) |
@unusualevent A small PR with a documentation update would be very much appreciated. |
@sharkdp I'd probably butcher the readme :/ |
with the addition of --pcre2 flag into BurntSushi/ripgrep , lookbehind is something i've been pining for. It'd be great if PCRE2 support could be added
The text was updated successfully, but these errors were encountered: