Resolved question

Batch: extract text using reg exp in windows bat file

by bkorn21 - 7/7/13 1:21 PM

Howdy! Novice question:

I can use the following regular expression

(?<=\[)(.*?)(?=\])

in textcrawler (a gui based Windows grep program) to extract text in between two brackets into another file. it works beautifully.

However, I need to be able to do that from a Windows bat file. Something like

grep (?<=\[)(.*?)(?=\]) myinput.txt >myoutput.txt (well..you get the idea)

I have tried numerous versions of command line grep programs for windows, but just cannot for the life of me find one that works (or more accurately, figure out the syntax to go get it to work.)

(sometimes just putting the reg expression in a bat file screws up the processing, so it sound like I need syntax help)

Thanks in advance...