输入banner图图片脚本导航/分类

求正则表达式完成这个需求

hbzy


找到文章中这样的图片,替换成



如何写正则表达式,然后如何处理呢


回复讨论(解决方案)

$html = <<html;$regImg = preg_match_all('/\"hbzy\"/', $html, $matches) ;$newSrc = $matches[1][0].'!static"'." _src=\"".$matches[1][0]."!static\" tsrc=\"".$matches[1][0];$html = str_replace($matches[1][0], $newSrc, $html);var_dump($html);

http://www.tantengvip.com/2014/02/preg-match-html/
Click here