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

1

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Sorry but i couldn't figure out how to do it , can you please show me an example ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.