stefankueng / grepWin

A powerful and fast search tool using regular expressions
https://tools.stefankueng.com/grepWin.html
GNU General Public License v3.0
1.76k stars 188 forks source link

Search for multiple lines fails #321

Closed colinsutton closed 2 years ago

colinsutton commented 2 years ago

When I search for either of two consecutive lines of text in my file, the search is successful. If I copy and paste the two lines into the 'click to enter the text as a multiline text' box, the 'Search for' box shows the texts separated by \r\n but grepwin does not find those lines in my file. Using notepad++ I can see that the file has the line separator only \n Notepad++ can find the two lines if I search for line1\nline2 When I change the search text in the grepwin 'search for' box to use only \n it still does not find those lines.

stefankueng commented 2 years ago

please try to replace the '\r\n' that's automatically inserted with '(?:\n|\r\n|\n\r)'

colinsutton commented 2 years ago

That worked. Looking forward to the next release!