#49062 [Opn->Csd]: example wrong for PCRE backreference
| From: | salathe@php.net | Date: | Sun, 26 Jul 2009 10:17:44 +0000 |
| Subject: | #49062 [Opn->Csd]: example wrong for PCRE backreference | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2548@lists.php.net to get a copy of this message | ||
ID: 49062
Updated by: salathe@php.net
Reported By: alan at hcibook dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Mac OSX
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2009-07-26 08:33:38] alan at hcibook dot com
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 this bug report at http://bugs.php.net/?id=49062&edit=1