<?php $p = '/<img.*?src=[\'|\"](.+?)[\'|\"].*?>/i'; preg_match_all($p,$str,$match); print_r($match[1][0]); ?>