PHP :: Bug #17957 :: Empty backreferences broken
| Bug #17957 | Empty backreferences broken | ||||
|---|---|---|---|---|---|
| Submitted: | 2002-06-24 18:08 UTC | Modified: | 2002-09-24 11:42 UTC | ||
| From: | john at scl dot co dot uk | Assigned: | |||
| Status: | Closed | Package: | Regexps related | ||
| PHP Version: | 4.3.0-dev | OS: | Linux 2.2.19 | ||
| Private report: | No | CVE-ID: | None | ||
[2002-06-24 18:08 UTC] john at scl dot co dot uk
<?
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'
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2002-07-09 06:34 UTC] john at scl dot co dot uk
[2002-09-24 11:42 UTC] iliaa@php.net