Anders Anders - 9 months ago 26 Question

What's wrong with my Regex string for scraping link elements

I'm having a little problem with a VB.NET scraper, it's supposed to get all links of a html string, which I have already downloaded, and the links are there (I have checked), so it must be something with my regex string.

My regex string:


This works for some sites, but for others it does not.

Here are examples from the HTML source that match and don't match.


<a href="" rel="nofollow" onmousedown="return clk('25936','3')" target="_blank">/a>

Not working:

<a href='' target="_blank" ><font size=2><b>text</b></a>

Could it be because of the


Check with following RegExp:


You are using double quotes 2 times. since a tag's href will be used with single and double quotes you have to check with both.