Ver original$url="http://www.dominio.com/carpeta/nofoto.jpg";$url=str_replace(array('<br />','<br>'),'',trim($url));if(preg_match('/^http\:\/\/[^\s]+\/nofoto\.jpg$/',$url)){ echo 'url válida';}else{ echo 'url inválida';}