Reading between text

August 18, 2009 at 02:10:37
Specs: Windows 7

I would like a code which can read the text between this line:

So it should read 'MyName' and set that as a variable (%name%)

Anyone any code? If not possible on batch, please give me the code for a other scripting language like perl or something like that.

See More: Reading between text

Report •

August 18, 2009 at 03:56:37
Got it done by myself,

findstr "<name>" meta.xml > temp1.lis
FOR /F "tokens=2 delims=>" %%i in (temp1.lis) do @echo %%i > temp2.lis
FOR /F "tokens=1 delims=<" %%i in (temp2.lis) do @echo %%i > temp3.lis

Report •
Related Solutions

Ask Question