好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

正则表达式提取图片路径 并过滤掉指定字符的写

我想对 html 的图片进行提取. <img ico src="http://localhost/UCenter/images/noavatar_small.gif" /> <img src="http://localhost/UCenter/images/noavatar_small.gif" /> 如上地址. 我想全部提取出来 但是包含'ico' 的地址 忽略. 求正则 , 就是有些图片 提取.有些不提取. 例子: <\s*img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*> 经改进后.. 正确解答如下 /<img(?:(?!(ico)).)+\/>/

查看更多关于正则表达式提取图片路径 并过滤掉指定字符的写的详细内容...

  阅读:59次