Re: preg_replace help
| From: | Jimmy | Date: | Sat, 12 Jan 2002 06:13:09 +0000 |
| Subject: | Re: preg_replace help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80267@lists.php.net to get a copy of this message | ||
Hi Gaylen,
> Please visit my web site at <a
> href=http://www.mysite.com>www.mysite.com</a>. You
> will be glad you did!
assumming all link start with www and all word which start
with www must be a link:
$repLink = preg_replace("/ (www[^ ]*) /i",
"<a href='http://\\1'>\\1</a>",
$myLink);
--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
People are like clouds, all unique.