search text string and copy to a file

February 20, 2011 at 20:46:15
Specs: Windows xp
I have a text file it contain url, I need to search the content of the file and output to text file only the url's using a vb script or bat file.

eg. text file as follows,

a href="http://dealer.tech.com/lc_grj200/repair2/html/frame_rm000000wbz03dx.html" class="tbl-para" target="_top">P0345</td></tr><tr><td class="tbl-par" width="50%">P0020</td><td class="tbl-par" width="50%">P0347</td></tr><tr><td class="tbl-par" width="50%">P0011</td><td class="tbl-par" width="50%"><a


output file should as follows,

http://dealer.tech.com/lc_grj200/re...
http://dealer.tech.com/lc_grj200/re...
http://dealer.tech.com/lc_grj200/re...

how do i write a vb script or bat file ?


See More: search text string and copy to a file

Report •


#1
February 20, 2011 at 21:25:10
Call me crazy but I don't see those URLs in that file.


=====================================
Life is too important to be taken seriously.

M2


Report •

#2
February 21, 2011 at 09:12:24
yes I posted another, this has a clear URL's

http://www.computing.net/answers/pr...


Report •

#3
February 21, 2011 at 19:49:56
Use the InStr$ function of VB to identify the start and end of the URL.

The use the Mid$ function to extract the URL using the numbers returned by InStr$

Stuart


Report •

Related Solutions

#4
February 21, 2011 at 22:15:47
Hi Stuart,

LOL I still haven't seen a viable file to parse.


=====================================
Life is too important to be taken seriously.

M2


Report •

#5
February 22, 2011 at 01:55:50
This is what I saw:

http://dealer.tech.com/lc_grj200/repair2/html/frame_rm000000wbz03dx.html

Stuart


Report •

#6
February 22, 2011 at 07:39:11
Thank you guys, someone said to use
URL Extractor Ver 1.0

It was a supper cool program and it fulfilled my requirement.
Thanks again


Report •


Ask Question