62,025
社区成员
发帖
与我相关
我的任务
分享
string html = @"<td width=""20%"" style='width:20.0%;border:solid windowtext 1.0pt;border-top:none;mso-border-top-alt:solid windowtext .75pt;mso-border-alt:solid windowtext .75pt;padding:0cm 0cm 0cm 0cm;height:22.5pt'><p class=MsoNormal align=center style='text-align:center;mso-pagination:widow-orphan'><span style='font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:#0066CC;mso-font-kerning:0pt'>段见忠</span><span lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:0pt'><o:p></o:p></span></p></td>";
string patten = @"<td\s+[^>]*>\s*<p\s+[^>]*>\s*<span\s+[^>]*>(?<testTitle3>[\s\S]*?)</span>[\s\S]*?</td>";
foreach (Match m in Regex.Matches(html, patten))
{
Console.WriteLine(m.Groups["testTitle3"].Value);
}
<td\s+[^>]*>\s*<p\s+[^>]*>\s*<span\s+[^>]*>(?<testTitle3>[\s\S]*?)</span>[\s\S]*?</td>