Why isn't a pattern which is terminated with \\$ working correctly on Windows?
#3234
-
Please tick this box to confirm you have reviewed the above.
What version of ripgrep are you using?How did you install ripgrep?
What operating system are you using ripgrep on?Windows 11 Home Describe your bug.
What are the steps to reproduce the behavior?WSL version with the latest release of What is the actual behavior?empty match What is the expected behavior?non-empty match |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Since you're on Windows, I can't tell whether your input files use CRLF or LF line endings. Have you tried the Maybe your And now with CRLF: My version of grep doesn't work with CRLF line terminators. But maybe yours does. Also, on Unix at least, using single quotes makes the escaping easier: |
Beta Was this translation helpful? Give feedback.
Since you're on Windows, I can't tell whether your input files use CRLF or LF line endings. Have you tried the
--crlfflag? This is relevant because it changes$from matching only\nto also matching\r\n.Maybe your
grepprogram is using CRLF automatically? It's hard to tell with the information you've provided. But it's easy to demonstrate the difference between LF and CRLF. First, LF: