note 13444 deleted from function.eregi-replace by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 02:08:24 +0000 |
| Subject: | note 13444 deleted from function.eregi-replace by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20245@lists.php.net to get a copy of this message | ||
I took LexZEUS's code, and improve it a bit:
<?
$url = "<HTML><BODY>
http://www.al-e_x.com/wh_at.php?what=2123123123&what=2123123123
<br>https://www.al-e_x.com/wh_at.php?what=2123123123&what=2123123123
<br>ftp://www.al-e_x.com/wh_at.php?what=2123123123
<br>mailto:alex@what_who_where-xyz.com
</BODY></HTML>";
$url = eregi_replace(
"((http|https|mailto|ftp):(\/\/)?[^[:space:]<>]{1,})",
"<a href='\\1'>\\1</a>",$url);
print $url;
?>
Raful