Skip to content
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 Request: Boolean match for muliple pattern #93

Closed
wwzhang opened this issue Dec 29, 2020 · 2 comments
Closed

Feature Request: Boolean match for muliple pattern #93

wwzhang opened this issue Dec 29, 2020 · 2 comments

Comments

@wwzhang
Copy link

wwzhang commented Dec 29, 2020

As version:0.9.6 on Brew, the patternfile seems only do OR search for the patterns. Could be possible to use boolean operators for the patterns?

Or could someone help me to do AND operations for two patterns?

@phiresky
Copy link
Owner

Your question is kind of underspecified. Do you mean matching multiple patterns in each line? Or generally matching files that contain both patterns? In any case, there is no simple way for either of these in a single command. You can use a pipeline to successively filter your results list down with multiple rga invocations. But since rga does not change the behaviour of regex matching in any way this is an issue for upstream ripgrep. There's open discussions e.g. here: BurntSushi/ripgrep#875

@wwzhang
Copy link
Author

wwzhang commented Dec 30, 2020

Got it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants