note 69316 deleted from reference.pcre.pattern.syntax by colder
| From: | colder@php.net | Date: | Mon, 18 Jun 2007 18:06:45 +0000 |
| Subject: | note 69316 deleted from reference.pcre.pattern.syntax by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127568@lists.php.net to get a copy of this message | ||
Note Submitter: no at need dot to
----
function to strip urls from a string (case insensitive).
function stripUrls($str)
{
$pattern="%((http://|https://|ftp://|file://|www.)[^\s]+?)(.*)%isU";
$str=preg_replace($pattern,"",$str);
return $str;
}