Skip to content

how do I invert a search with multiple patterns? #2628

Answered by s-p-turner
zz5678 asked this question in Q&A
Discussion options

You must be logged in to vote

Fwiw, two alternative ways to achieve what you want would be either:

rg -v ab "input-file" | rg -v 12

or (more efficient):

rg -v 'ab|12' "input-file"

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by BurntSushi
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2627 on October 13, 2023 13:29.