/ Published in: PHP
Expand |
Embed | Plain Text
$string = preg_replace('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i', '', $string);
You need to login to post a comment.
smoover on 05/22/09
url String regexp remove regular Expression
3 people have marked this snippet as a favorite
$string = preg_replace('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i', '', $string);
You need to login to post a comment.