note 91625 deleted from function.preg-replace by danbrown
| From: | danbrown@php.net | Date: | Fri, 19 Jun 2009 22:44:25 +0000 |
| Subject: | note 91625 deleted from function.preg-replace by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157149@lists.php.net to get a copy of this message | ||
Note Submitter: Ortwin Gentz
----
I'm trying to make @replies in Twitter messages hot:
$tweet = preg_replace("/(\W)\@(\w+)(\W|$)/", "$1<a href='http://twitter.com/$2'>@$2</a>$3",
$rawtweet);
This code only works for the 1st @reply although no limit has been set. It looks like it is not
possible to do this replacement in one function call.