ID: 12752
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: PCRE related
Operating System: Linux Redhat 7.1
PHP Version: 4.0.6
New Comment:

http://www.php.net/manual/en/function.preg-replace.php

Previous Comments:
------------------------------------------------------------------------

[2001-08-15 00:15:08] [EMAIL PROTECTED]

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 this 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