取出图片全路径正则表达式-php

查找一段字符串内img标签的图片全路径

$str='

'; $pattern="/<[img|IMG].*?src=[\'|\"](.*?(?:[\.gif|\.jpg]))[\'|\"].*?[\/]?>/"; preg_match_all($pattern,$str,$match); print_r($match);

你可能感兴趣的:(取出图片全路径正则表达式-php)