code:
$str = 'http://www.google.com <img src="http://placehold.it/350x150" />';
$str = preg_replace('/\b(https?):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i', '', $str);
echo $str;
output:
<img src="" />
i need this output:
<img src="http://placehold.it/350x150" />
how can i do it?
thanks for help.