note 79206 rejected from function.preg-replace by ezyang
| From: | ezyang@php.net | Date: | Thu, 15 Nov 2007 21:24:39 +0000 |
| Subject: | note 79206 rejected from function.preg-replace by ezyang | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-132323@lists.php.net to get a copy of this message | ||
Note Submitter: andrejevicnemanja at gmail dot com
----
Can someone tell me what is wrong with this code?
$message = preg_replace('#\[color=([0-9A-F]*)\](.*?)\[/color\]#si', '<span
style=\'color:\1\'>\2</span>', $message);
It's working fine untill the message has more than 3 charachters(without the [color=some hex
color][color] code) ...
Please HELP . . .