正则表达式获取html代码里的数据
<div class="blue14fontbold" id="new_page"><span><img height="11" width="6" src="http://www.m1905.com/m_images/images/pageleft.jpg"> </span><span>总数:
<b>23</b></span> <a class="pre" href="http://www.m1905.com/yx/film/c1p0.html">上一页</a><u><b>1</b></u> <a href="http://www.m1905.com/yx/film/c1p2.html">2</a>
<a href="http://www.m1905.com/yx/film/c1p3.html">3</a> <a class="next" href="http://www.m1905.com/yx/film/c1p2.html">下一页</a><span> <img height="11" width="6"
src="http://www.m1905.com/m_images/images/pageright.jpg"></span>
</div>
如上所示:用正则表达式匹配 <a href="http://www.m1905.com/yx/film/c1p2.html">2</a>
<a href="http://www.m1905.com/yx/film/c1p3.html">3</a>这部分内容里a标签href上的内容 即:http://www.m1905.com/yx/film/c1p2.html
------解决方案--------------------
C# code
(?i)(?<=<a\shref=").*?(?=")
------解决方案--------------------
------解决方案--------------------
foreach(Match match in Regex.Matches(@"(?is)<a\s+href=""(.+?)"">"))
Response.Write(match.Groups[1].Value+"<br/>");