0

I get this value by Regex <a href="http://www.site.com/path/index.php" class="visio_large" target=""><span>Click here</span></a>

How can I get the URL "http://site.com/path/index.php"(without quotes) and leave all rest of the value

user2170523
  • 19
  • 1
  • 7
  • I would use [`HtmlAgilityPack`](http://htmlagilitypack.codeplex.com/) to parse html (always worth "reading": http://stackoverflow.com/a/1732454/284240). – Tim Schmelter Mar 29 '13 at 13:57

1 Answers1

1

Try avoiding parsing HTML with Regex.

But if you're sure about the cleanliness of the HTML and you need a quick hack, then you could use this regex:

/<a href="(.+)">/

Build it using New Regex() and match with .Match() and get the value with .Value