110,499
社区成员
发帖
与我相关
我的任务
分享
string tempstr = @"<A href='http://111.222.333' target=_blabk>固定文字</a>";
string pat = @"(?is)<A\s*href='([^']*?)'\s*target=_blabk>(.*?)</a>";
MatchCollection matches = Regex.Matches(tempstr, pat);
List<string> topdata = new List<string>();
foreach (Match match in matches)
{
topdata.Add(match.Groups[1].Value, match.Groups[2].Value);//http://111.222.333,固定文字
}
Regex reg = new Regex(@"<A[^>]*?href=.*固定文字</a>");