Bug #17957: Empty backreferences broken

From: Date: Mon, 24 Jun 2002 22:08:46 +0000
Subject: Bug #17957: Empty backreferences broken
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-11982@lists.php.net to get a copy of this message
From: john@scl.co.uk Operating system: Linux 2.2.19 PHP version: 4.2.1 PHP Bug Type: Regexps related Bug description: Empty backreferences broken <? echo ereg_replace("^(a*)",'\1','a')."\n"; echo ereg_replace("^(a*)",'\1','b')."\n"; echo ereg_replace("^(a)*",'\1','a')."\n"; echo ereg_replace("^(a)*",'\1','b')."\n"; ?> produces: a b a \1b should produce: a b a b './configure' '--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/usr/lib' '--with-curl' '--with-pdflib=shared' '--with-mcrypt' '--with-pcre' '--with-dom' '--with-pear' '--with-xml=shared' '--with-zlib-dir=/usr' '--prefix=/usr' '--enable-debug=no' '--enable-safe-mode' '--with-exec-dir=/usr/bin' '--with-mysql=/usr' '--with-regex=system' -- Edit bug report at http://bugs.php.net/?id=17957&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17957&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17957&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17957&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17957&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17957&r=support Expected behavior: http://bugs.php.net/fix.php?id=17957&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17957&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17957&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17957&r=globals

« previous php.bugs (#11982) next »