Posted By

smoover on 05/22/09


Tagged

url String regexp remove regular Expression


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

ikimozu
vali29
tradade


Remove URLs from String


 / Published in: PHP
 

  1. $string = preg_replace('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i', '', $string);

Report this snippet  

You need to login to post a comment.