Closed wwzhang closed 3 years ago
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: https://github.com/BurntSushi/ripgrep/issues/875
Got it. Thanks.
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?