Skip to content

How to make ripgrep match multiple rules in one line or use longest match principle? #1644

Answered by BurntSushi
XhstormR asked this question in General
Discussion options

You must be logged in to vote

The only way is to sort your rules file by the length of each rule in descending order.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@BurntSushi
Comment options

Answer selected by XhstormR
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
Labels
None yet
2 participants