Searching for a string parameter #2084
-
Hi there If i am trying to search for a string in a binary file which is on 2 lines in the following format whats the best way to approach
I have tried the following however its failing "(?i)abc\s+abcdef" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Well, ripgrep is a line oriented search tool. So searching across lines requires enabling multi-line mode. To that end, the simple answer to your question is to write a regex that searches across multiple lines:
Your regex doesn't account for the fact that there are non-whitespace characters between |
Beta Was this translation helpful? Give feedback.
-
Hi so i tried using the following syntax 'abc.?\n.?abcdef' using multi line mode but i got the following error [ERROR][GrepEngine] Could not parse ripgrep response: |
Beta Was this translation helpful? Give feedback.
Well, ripgrep is a line oriented search tool. So searching across lines requires enabling multi-line mode. To that end, the simple answer to your question is to write a regex that searches across multiple lines:
Your regex doesn't account for the fact that there are non-whitespace characters between
abc
andabcdef
.