note 15607 added to function.preg-replace
| From: | Dago at pandora dot be | Date: | Sat, 22 Sep 2001 21:40:17 +0000 |
| Subject: | note 15607 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18191@lists.php.net to get a copy of this message | ||
I found this useful too:
$url = preg_replace("/(\[URL=)(http|https|ftp)(:\/\/\S+)(])(.+?)(\[\/URL\])/" ,
"<a href=\"\\2\\3\">\\5 target=\"_blank\"</a>" , $url);
http://www.php.net/manual/en/function.preg-replace.php