how to look for a defined string followed by anything

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Rileyh
Posts: 147
Joined: 01 Sep 2011 03:54
Location: Perth, Western Australia

how to look for a defined string followed by anything

#1 Post by Rileyh » 30 Oct 2011 20:51

Hi
I need to find out how to look for a defined string, but then look for anything. For example:

Code: Select all

for /f "tokens=* delims= " %%a in ('find /c /i "(defined string)" "test.txt"') do (something random)

Now, the part I'm having a problem with is I can't figure out how to make my batch file look for a random string that occurs after the "defined string" part. I want it to find a random string enclosed in quotes ("") that occurs after the defined string.

Is that possible? Please help me.

Any help would be appreciated,
Rileyh

Post Reply