, , .
:
http:
http://www.myserver.com/virus.exe
, , , (, % 00 , )
$matches = array();
preg_match_all('!http://[^?#]+\.(?:jpe?g|png|gif)!Ui' , $string , $matches);
, , , , , , , , , :
$matches = array();
preg_match_all('!http://[a-z0-9\-\.\/]+\.(?:jpe?g|png|gif)!Ui' , $string , $matches);
.