Is it possible to regex replace from command line? Right now I'm using notepad++ to do this. In command line I can only use FINDSTR wich can only locate the mached files/lines
EDIT :
Maybe it will be possible to make a VB script and run it from cmd? I just created a file "hi.vbs" with the content
Msgbox "Hi Buddy"
Then cmd allows me to run it directly by typing "hi" from command line.
So if it is not possible with batch script, then i may use a VB script trough batch. Or..?
Best Answer
go here
http://gnuwin32.sourceforge.net/packages.html
scroll down to SED. Download coreutils too while you're at it.
this command will replace a with b globally, and on each line. so not just the first occurrence on the line.
e.g. using sed "s/a/b/g" a.txt
VBScript does support regular expressions, you can do find and replace with it.
Displays bxxx dxxx xxx