user2170523
user2170523

Reputation: 19

Regex and split/replace VB.NET

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

Upvotes: 0

Views: 110

Answers (1)

user2032663
user2032663

Reputation:

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

Upvotes: 1

Related Questions