Hi.
I am doing some stuff in asp/vbscript and I am currently having a few issues.
I have a variable which contains a load of data (sample data below). What I am looking to do is use reg. exp. to find particular items and if found then extract this particular information and loop through and basically 'response.write' the results.
Data sample:
The elements I am looking to FIND is whether an '<IMG' tag is contained within it and is so then pull out the path to the file. So running it on the above data would result in the following data being posted to back to the webpage:
Just not sure how to do it really. I have read a few tutorials but....to be honest...im still lost. Anyone able to point me in the right direction or give me something to start with?
Thanks a lot peeps!
- FateFirst
I am doing some stuff in asp/vbscript and I am currently having a few issues.
I have a variable which contains a load of data (sample data below). What I am looking to do is use reg. exp. to find particular items and if found then extract this particular information and loop through and basically 'response.write' the results.
Data sample:
Code:
strData = "<P class=MsoNormal 0cm 0pt><FONT face=Arial><FONT size=2><SPAN 12pt; FONT-FAMILY: Arial; mso-fareast-font-family: ?Times New Roman?; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA mso-bidi-font-family: 13.0pt; mso-bidi-font-size: Light?; MT Sans ?Gill><IMG alt="" hspace=0 src="H:\Projects\temp\dir1\29-11-04\website\image1.gif" align=baseline border=0> <IMG alt="" hspace=0 src="H:\Projects\temp\dir1\29-11-04\website\image2.gif" align=baseline border=0></SPAN></FONT></FONT></P>"
The elements I am looking to FIND is whether an '<IMG' tag is contained within it and is so then pull out the path to the file. So running it on the above data would result in the following data being posted to back to the webpage:
Code:
H:\Projects\temp\dir1\29-11-04\website\image1.gif
H:\Projects\temp\dir1\29-11-04\website\image2.gif
Just not sure how to do it really. I have read a few tutorials but....to be honest...im still lost. Anyone able to point me in the right direction or give me something to start with?
Thanks a lot peeps!
- FateFirst