codice:
$string = '<html>[img]images/xxx.jpg[/img]ciao[img]images/yyy.gif[/img]</html>';
preg_match_all('#src="(.+?)"#',$string,$mth);
echo '<pre>';
print_r($mth[1]);