From:             [EMAIL PROTECTED]
Operating system: Linux Redhat 7.1
PHP version:      4.0.6
PHP Bug Type:     PCRE related
Bug description:  preg_replace eats '$' characters

The preg_replace function seems to dissapear '$' characters, and up to two
more numeric characters after it. If the character after the dollar sign is
not a number, it works as expected.

$string = 'sum: {token} pesos.';
$number= '$123,456.78';
$number2='$ 123,456.78';
echo  "Wrong: ".preg_replace("/\{token\}/i",$number,$string);
echo  "<br>Right: ".preg_replace("/\{token\}/i",$number2,$string);

My configure line:
'./configure' '--with-apxs' '--with-pgsql' '--without-mysql'
'--with-openssl' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf'
-- 
Edit bug report at: http://bugs.php.net/?id=12752&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to