note 78917 deleted from function.preg-replace by tularis
| From: | tularis@php.net | Date: | Fri, 02 Nov 2007 07:53:46 +0000 |
| Subject: | note 78917 deleted from function.preg-replace by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-131936@lists.php.net to get a copy of this message | ||
Note Submitter: aldizz
Reason: useless
----
Hi.. that is optimized script for links in text
$str = preg_replace("/(\A|[^=\]'\"a-zA-Z0-9])
((dchub|http|mailto|ftp|https|ftps|irc):\/\/[^()<>\s]+)/i",
"\\1<a href=\"\\2\">\\2</a>", $str);