111,129
社区成员
发帖
与我相关
我的任务
分享
Regex reg = new Regex(@"(?i)<a[^>]*?href=(['""]?)(?<url>/market/detail/[^'""\s>]+)\1[^>]*>");
MatchCollection mc = reg.Matches(yourStr);
foreach (Match m in mc)
{
richTextBox2.Text += m.Groups["url"].Value + "\n";
}MatchCollection mc = Regex.Matches(html字符串,@"<a href=""/market/detail/[^>]*>");
foreach(Match m in mc)
{
//m.Value就是你要的每一个类似的标记
}MatchCollection mc = Regex.Matches(html字符串,@"<a href="/market/detail/[^>]*>");
foreach(Match m in mc)
{
//m.Value就是你要的每一个类似的标记
}