日期:2014-05-17 浏览次数:20492 次
<td align="center" width="86" style="font-size:12px;" rowspan="1" bgcolor="#d2691e"><span class='f12a6'>■</span><a>1单元-2302</a></td> <td align="center" width="86" style="font-size:12px;" rowspan="1" bgcolor="#33CC00"><span class='f12a6'>■</span><a href="www.web1.com">1单元-2303</a></td> <td align="center" width="86" style="font-size:12px;" rowspan="1" bgcolor="#d2691e"><span class='f12a6'>■</span><a>1单元-2301</a></td> <td align="center" width="86" style="font-size:12px;" rowspan="1" bgcolor="#33CC00"><span class='f12a6'>■</span><a href="www.web2.com">2单元-2301</a></td>
MatchCollection matches = Regex.Matches("", @"(?is)<td[^>]+><span[^>]+>[^<>]*</span><a(?:\s*href=""(?<href>.+?)"")?>(?<value>[^>]+)</a></td>"); foreach (Match match in matches) { Response.Write(match.Groups["value"].Value + "<br/>"); Response.Write(match.Groups["href"].Value + "<br/><br/>"); }