Bug #17889: searhing for backslash using preg_replace() and/or str_replace() is buggy.

From: Date: Fri, 21 Jun 2002 02:41:42 +0000
Subject: Bug #17889: searhing for backslash using preg_replace() and/or str_replace() is buggy.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-11632@lists.php.net to get a copy of this message
From: gArgraves@earthlink.net Operating system: freeBSD PHP version: 4.2.1 PHP Bug Type: Regexps related Bug description: searhing for backslash using preg_replace() and/or str_replace() is buggy. Hello, I am trying to match escaped character sequences for a replacement to avoid forward handling problems. a search pattern of: "/(\\)(.)/" or "/(\\)(\.)/" or which matches escaped characters, returns rutime errors. This reg.exp. would allows replacement using either $1,$2 or //1, //2 to cotrol replacement. Note: search pattern: "\\\." will locate the escaped charaters correctly, however can not do the desired replacement. Gary -- Edit bug report at http://bugs.php.net/?id=17889&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17889&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17889&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17889&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17889&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17889&r=support Expected behavior: http://bugs.php.net/fix.php?id=17889&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17889&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17889&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17889&r=globals

« previous php.bugs (#11632) next »