How to escape double underscore and single underscore in rg. #2324
-
I do tried.
But How do I capture content contains |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is almost certainly an instance of the XY problem. Namely, underscores never need to be escaped because they are not meta characters:
So if |
Beta Was this translation helpful? Give feedback.
This is almost certainly an instance of the XY problem. Namely, underscores never need to be escaped because they are not meta characters:
So if
rg __FLT_DIG__
isn't showing the matches you expect, then it's almost certainly because of some other problem. You'll need to either provide a complete reproduction, and/or take a look at the--debug
output. Remember, as the very first lines of the ripgrep docs state, ripgrep will by default ignore things matching your gitignore, hidden files and binary files.