Question Regular Expression help...I think!

KMxRetro

New member
Joined
May 10, 2008
Messages
1
Programming Experience
Beginner
Hi everyone,
Just starting out with VB development in general thanks to a new job, and I'm playing about with creating an app or two to further my knowledge. But, I'm stuck and am hoping that someone can help me out here.

I have a string ripped from a HTML file, and I need to remove certain parts of it.

I've done 90% of the job, but now I come to a section where I need to remove the following piece of HTML:-

<IMG SRC="/images/furniture/ow.gif" ALT=overweight>1

...from the following piece of HTML:-

<IMG SRC="/images/furniture/ow.gif" ALT=overweight>1</td>

Seems easy enough to begin with, but firstly, how do I escape the quotes for a string.replace...and secondly, the number that appears in the code isn't always 1. Is there a way to strip out that code, no matter what the number is?

Many thanks in advance...I'm sure I'll be pestering you all a lot more often in the future as I pick this stuff up!

All the best,
KMx
 
I'm no expert but it seems to me that the InStr function would work. Look for ">" in your string. Add one to the result. Then, you could use the Left$ function to capture your string.
 
Back
Top