extract reg exp to file in windows

A place to try and solve your RegEx problems.
Post Reply
bkorn21
Posts: 1
Joined: Fri Jul 05, 2013 4:53 pm

extract reg exp to file in windows

Post by bkorn21 »

Howdy..I am a super novice, and I apologize in advance if my question has already been covered.

TextCrawler works beautifully with the following regular expression: (?<=\[)(.*?)(?=\])

That is, I can use it to extract any text in between two brackets [any text] to a file. I love it!

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 get it to work. Is there ANY way to do this with TextCrawler (or, if not, with a windows command line grep program?)

(sometimes just putting the reg expression in a bat file screws up the processing. )

Thank you all !

Bruce
Post Reply