stefankueng / grepWin

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

regex in commandline mode not work #432

Closed hoangdiemtinh closed 9 months ago

hoangdiemtinh commented 10 months ago

sorry for my bad english.

I run cmd:

"G:\grepWin-v2.0.15-2023-6-10\grepWin-2.0.15_portable.exe" /regex:yes /searchpath:"G:\set.txt" /searchfor:display_name="(.*?)" /replacewith:display_name="ok fine" /executereplace /nosavesettings /k:no /closedialog

Content in set.txt file: abc.display_name="a1 b1 c1" def.display_name="a2 b2 c2"

regex in commandline mode not work. regex in form mode is work.

image

please help for my case.

hoangdiemtinh commented 10 months ago

I corrected myself. display_name="\"ok fine\""

stefankueng commented 9 months ago

if you want to pass complex regex search strings via command line, you'll have to use the ini file approach because the command line get's parsed as commands. So: use the /searchini command.

https://tools.stefankueng.com/grepWin_cmd.html