This uses just one expression (and that is a fast preg_ insteat of ereg) for
both, mailto: and http: links (and news:, too):
$text =
preg_replace('#(^|[^\"=]{1})(http://|ftp://|mailto:|news:)([^\s<>]+)([\s\n<>
]|$)#sm',"\\1<a href=\\\"\\2\\3\\\"
target=\\\"blank\\\"><u>\\2\\3</u></a>\\4",$text);
ciao,
matt
--
s o m e o n GmbH
Community Software & Service
Elberfelder Str. 8 Tel. +49 (0)2104 171337
40822 Mettmann Fax +49 (0)2104 171 339
Germany
[EMAIL PROTECTED] http://someon.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]