note 48622 deleted from function.ereg-replace by kennyt
| From: | kennyt@php.net | Date: | Wed, 26 Jan 2005 03:53:42 +0000 |
| Subject: | note 48622 deleted from function.ereg-replace by kennyt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83978@lists.php.net to get a copy of this message | ||
Note Submitter: mikosoft- at -pobox- dot -sk (remove dashes)
----
[enEmy]Master.cz's code has a little bug. The first line would turn any link protocol into
http. The correct line is:
<?
$text = ereg_replace("([[:alpha:]]+://)([^<>[:space:]]+[[:alnum:]/])","<a
href=\"\\0\">\\0</a>", $text);
?>