I have a string in which I have anchor tag I want to know the href values of those anchor tags.
my string is like:
This is Test page <a href='test.aspx'>test page</a> .
in this I want to find the value of href i.e. test.aspx
Please suggest me any good regx group for this.
if you use
<a [^>]*href=(?:'(?<href>.*?)')|(?:"(?<href>.*?)")then the result will be stored in the named group hrefExample:
urls will be a collection of strings containing the hrefs.