过滤非图片链接
Regex regex11 = new Regex(@"https?://(\w*:\w*@)?[-\w.]+(:\d+)?(/([\w/_.]*(\?\S+)?)?)?", RegexOptions.IgnoreCase);
html = regex11.Replace("<div> <a href='
http://www.baidu.com/'>asdf</a> <strong>好了</strong><img src='
http://www.baidu.com/images/aa/a.gif'>还有<img src='
http://www.baidu.com/images/aa/b.png'></div> ","");
结果把三个链接都过滤了,想保留两个图片的连接
怎么改哦
------解决方案--------------------(?i)(?<=href=\s?['])https?://(?:[0-9a-z.-])+(?::\d{1,4})?(?:/[0-9a-z.-])*
------解决方案--------------------晕啊
Regex regex11 = new Regex(@"https?://((?!\.(jpe?g
------解决方案--------------------png
------解决方案--------------------bmp
------解决方案--------------------gif)[""\s'])[^""'\s])*(?=[""'\s])");