note 79206 added to function.preg-replace
| From: | andrejevicnemanja at gmail dot com | Date: | Thu, 15 Nov 2007 18:04:34 +0000 |
| Subject: | note 79206 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132310@lists.php.net to get a copy of this message | ||
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 . . .
----
Server IP: 69.147.83.197
Probable Submitter: 213.244.194.188
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace.php
Edit -- https://master.php.net/note/edit/79206
Del: integrated -- https://master.php.net/note/delete/79206/integrated
Del: useless -- https://master.php.net/note/delete/79206/useless
Del: bad code -- https://master.php.net/note/delete/79206/bad+code
Del: spam -- https://master.php.net/note/delete/79206/spam
Del: non-english -- https://master.php.net/note/delete/79206/non-english
Del: in docs -- https://master.php.net/note/delete/79206/in+docs
Del: other reasons-- https://master.php.net/note/delete/79206
Reject -- https://master.php.net/note/reject/79206
Search -- https://master.php.net/manage/user-notes.php