2014-11-02 162 views
0

我想解析html文件并从<a>标记中提取链接。例如,我试图从以下<a>标签中提取链接。解析HTML页面以提取链接

<a class="thumb vtop inlblk rel tdnone linkWithHash scale5 detailsLink" href="http://olx.com.pk/item/honda-civic-exi-2005-IDSkzkt.html#6256e9ac30" title=""> <img class="fleft" src="http://img03.olx.com.pk/images_olxpk/89491775_1_144x108_honda-civic-exi-2005-lahore_rev001.jpg" alt="Honda Civic Exi 2005"> </a>

我用下面的正则表达式

private const string _LINK_REGEX = "href=\"[a-zA-Z./:&\\d_-]+\""; 

但我无法提取这个网址。

回答