日期:2014-05-17  浏览次数:20420 次

帮写个正则,获取<img>里面的src
我这个img标签不仅仅是
<img src=""/>

也包含一些样式
<img src="" style="" class=""  style="width:353px;height:249px;" alt=""/>

我只要src
正则 html

------解决方案--------------------
Regex reg1 = new Regex(@"(?i)<img[^>]*?src=(['""]?)(?<src>[^'""\s>]+)\1[^>]*>", RegexOptions.IgnoreCase 
------解决方案--------------------
 RegexOptions.Singleline);
            MatchCollection mc = reg1.Matches(page);
            foreach (Match m1 in mc)
            {
                string imgUrl = m1.Groups["src"].Value;
            }

------解决方案--------------------
like this?
http://www.cnblogs.com/insus/archive/2012/10/30/2745843.html