Asp.net 如何抓住两者之间的价值<;a></a>;在web抓取/正则表达式中

Asp.net 如何抓住两者之间的价值<;a></a>;在web抓取/正则表达式中,asp.net,regex,web-scraping,Asp.net,Regex,Web Scraping,我想得到锚定标签的价值,这意味着我想从另一个网站上得到1947年的锚定标签。什么是正则表达式 <a onclick="ClearInfoAndDataTable();" href="/subdomains/all/all/1/ahrefs_rank_desc?target=www.homeocare.in">1,947</a> 我正在使用此代码,但没有得到值 MatchCollection AltTag = Regex.

我想得到锚定标签的价值,这意味着我想从另一个网站上得到1947年的锚定标签。什么是正则表达式

<a onclick="ClearInfoAndDataTable();" href="/subdomains/all/all/1/ahrefs_rank_desc?target=www.homeocare.in">1,947</a>

我正在使用此代码,但没有得到值

   MatchCollection AltTag = Regex.Matches(myResponse, @"(?s)(?<=<a\s[^<]*?>)(.*?)(?=</a>)", RegexOptions.IgnoreCase | RegexOptions.Multiline);
MatchCollection AltTag=Regex.Matches(myResponse,@“(?使用此正则表达式和Linq(这将为您提供一个包含所有锚的数组):


var anchors=Regex.Matches(s,@)。

我得到了一些锚链接。喜欢但没有得到这个链接值@zaki
var anchors = Regex.Matches(s, @"<a [^>]*>(.*?)</a>").Cast<Match>().Select(m => m.Groups[1].Value);