Bug #12752: preg_replace eats '$' characters

From: Date: Wed, 15 Aug 2001 04:15:08 +0000
Subject: Bug #12752: preg_replace eats '$' characters
Groups: php.dev 
Request: Send a blank email to php-dev+get-63219@lists.php.net to get a copy of this message
From: ruben@lingo.com.mx 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

« previous php.dev (#63219) next »