Help with regular expressions

kirstyb

Member
Joined
Sep 12, 2005
Messages
7
Programming Experience
Beginner
Hi guys

Ive only recently started using regular Expressions so the following was a bit lost on me.

Ok, this div tag appears several times in a webpage. What I want is a regular expression to return 'The beeches'
The Company Name will either be in the format:

<div class="companyname">
<h2>









<a href='www.blahblahblah.poo">The Beeches<span class="hidden"> (2) </span></a>




</h2>
</div>


OR

<div class="companyname">
<h2>









The Beeches




</h2>
</div>

The one major change being the missing url on the second

So basically I would want the result to be that strCompanyName is "The Beeches" :confused:
I can then go on and do a nextmatch.
Any ideas
Thanks guys
 
why did you move this

kulrom said:
In the John's manner: moved to more appropriate foum :D

This is a VB.NET application not asp.net it just happens to be reading in a webpage.

So why did you move it?!
 
Back
Top