#49062 [NEW]: example wrong for PCRE backreference
| From: | alan at hcibook dot com | Date: | Sun, 26 Jul 2009 08:33:38 +0000 |
| Subject: | #49062 [NEW]: example wrong for PCRE backreference | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-2547@lists.php.net to get a copy of this message | ||
From: alan at hcibook dot com
Operating system: Mac OSX
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: example wrong for PCRE backreference
Description:
------------
The last of the example strings below should be
"ababba"
The string "ababaa" does not match as the pattern for the previous (2nd)
iteration is "ba", hence to match b\1 on the third iteration, the rest of
the string needs to be "bba"
other matching strings
"abaaba"
"abaaababba"
"ababbabbba"
Reproduce code:
---------------
---
From manual page: regexp.reference.back-references
---
For example, the pattern (a|b\1)+ matches any number of "a"s and also
"aba", "ababaa" etc.
--
Edit bug report at http://bugs.php.net/?id=49062&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49062&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49062&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49062&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49062&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49062&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49062&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49062&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49062&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49062&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49062&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49062&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49062&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49062&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49062&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49062&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49062&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49062&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49062&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49062&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49062&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49062&r=mysqlcfg