How to extract a perticular string in a text

November 22, 2010 at 20:34:32
Specs: Windows XP
Hello Guys:
i want to extract perticular string from the text file.
Ex: if the files contains the below text
" CPEType="Westell 6100" serviceID="770-967-6748" ID="1-2044081023" companyName="Residential" updateFlag="N" callBackTNExtn= and ID="1-4545445" "

In this file i want to extract the value for only "ID" here it should throw me
ID=1-2044081023 & ID=1-4545445.

Please suggest how can i proceed.


See More: How to extract a perticular string in a text

Report •

November 22, 2010 at 21:03:51
i tried the below command
findstr "ID" tttt.txt > results.txt
But it is throwing entire content of the file..

need your help

Report •

November 23, 2010 at 06:24:58
@echo off
set file=Path of your file..
for /f "tokens=5,10 delims= " %%a in (%file%) do echo %%a %%b

it will bring up what you asked...

Subhash Chandra.

Report •
Related Solutions

Ask Question