note 9835 deleted from function.ereg-replace by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 01:54:04 +0000 |
| Subject: | note 9835 deleted from function.ereg-replace by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20196@lists.php.net to get a copy of this message | ||
I made a little regexp that converts a
pattern for inserting links, to be used by users not familiar with html.
usage:
url::Name of Link:http://www.your-url-here.com
and here's my regexp:
ereg_replace("url::(([[:alnum:]]|[[:space:]])*):((ftp://)|(http://))(([[:alnum:]]|[[:punct:]])*)",
"<a href=\"\\5\\6\" target=\"_blank\">\\1</a>",$string);