1,978
社区成员
发帖
与我相关
我的任务
分享
@"<a[^>]*href=(['""]?)(?<url>[^/.""'\s>]+\.html)\1[^>]*>(?<text>[\s\S]*?)</a>"
MatchCollection mc = Regex.Matches(yourStr, @"<a[^>]*href=(['""]?)(?<url>[^/.""'\s>]+\.html)\1[^>]*>(?<text>[\s\S]*?)</a>", RegexOptions.IgnoreCase);
foreach (Match m in mc)
{
richTextBox2.Text += m.Groups["url"].Value + "\n";
richTextBox2.Text += m.Groups["text"].Value + "\n";
}
(?<!/)\d+\.html
[^/.]+\.html