Bug #12752 Updated: preg_replace eats '$' characters

From: Date: Wed, 15 Aug 2001 09:59:24 +0000
Subject: Bug #12752 Updated: preg_replace eats '$' characters
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-63249@lists.php.net to get a copy of this message
ID: 12752 Updated by: cynic Reported By: ruben@lingo.com.mx 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] ruben@lingo.com.mx 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

« previous php.dev (#63249) next »