bug with preg_replace
| From: | Florent Maffet | Date: | Fri, 19 Nov 1999 09:27:45 +0000 |
| Subject: | bug with preg_replace | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6507@lists.php.net to get a copy of this message | ||
Hi,
I am using the function preg_replace with the commands
i and e (for case insensitive and execute).
That function used to work fine with PHP4b2, but it seems
that it does not work anymore (in fact it has a weird
behavior) with PHP4b3 (every RCx and also the release version)
What is done in my code is sthg like:
preg_replace("/.*\"(.*)\".*/ie","function(\"\\1\");",$string);
Note that it DOES work fine in PHP4b2
And it works for the first occurence of the regexp in string,
but not for the following ones
--
,-------. ,---------------------.
|Florent \___/ what@floo.freesurf.fr|
]-- Web is on http://www.floo.org --[
|System & Network | www.claranet.fr|
`------------------^----------------'