$str='';
$pattern="/<[img|IMG].*?src=[\'|\"](.*?(?:[\.gif|\.jpg]))[\'|\"].*?[\/]?>/";
preg_match_all($pattern,$str,$match);
print_r($match);
?>
结果显示:
Array
(
[0] => Array
(
[0] =>![]()
)
[1] => Array
(
[0] => https://www.gxlcms.com/upfiles/2009/07/1246430143_1.jpg
)
)
