stefankueng / grepWin

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

BUG replacing text as "Text Search" #476

Closed Softproman closed 3 months ago

Softproman commented 3 months ago

I have the file "FileWithTextToBeReplaced.txt" with content: <DCC_BplOutput>..\Lib\RAD11\$(Platform)\</DCC_BplOutput> image

I wish replace the word "RAD11" by "RAD12" with GrepWin. I configure as...: image

I press "Replace" and the content of "FileWithTextToBeReplaced.txt" is: <DCC_BplOutput>..ibrad12\$(platform)</dcc_bploutput> image

The replacement is wrong.

TheCartpenter commented 3 months ago

Looks like a malformed regex search pattern. I used the regex search option instead of the text search option and I searched for:

<DCC_BplOutput>..\\Lib\\(RAD11\\)\$\(Platform\)</DCC_BplOutput>

I replaced it with:

<DCC_BplOutput>..\\Lib\\RAD12\$\(Platform\)</DCC_BplOutput>

Works just fine.

stefankueng commented 3 months ago

works fine with the latest dev version: https://github.com/stefankueng/grepWin/actions/runs/9155897409

Softproman commented 3 months ago

GitHub ate a character at the beginning of the post (ScreenShot and image not match. I have solved it). My intention was to search for plain text, not regular expressions. In any case, I have tested it with the latest development version that you have attached and the search works correctly. With the latest official version (2.0.15) the problem is reproduced.