Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regular expression problem

Status
Not open for further replies.

raphael232

Programmer
Jun 9, 2006
51
GB
Hi, how do you return the text between a link using a regular expression i tried:

Set objRegExp = New RegExp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<a(.*?)>(.*?)</a>"
Set objMatches = objRegExp.Execute(strContent)

strText = objMatches(0).value but it also includes the link. How do i get just the bit between the link. Appreciate your help.

Thanks
 
strText = objMatches(0).value
[tt]strText = objMatches(0).submatches(1)[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top