note 58559 added to reference.pcre.pattern.syntax
| From: | roland dot illig at gmx dot de | Date: | Tue, 08 Nov 2005 09:02:25 +0000 |
| Subject: | note 58559 added to reference.pcre.pattern.syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-98238@lists.php.net to get a copy of this message | ||
<quote>
9. Another as yet unresolved discrepancy is that in Perl 5.005_02 the pattern /^(a)?(?(1)a|b)+$/
matches the string "a", whereas in PCRE it does not. However, in both Perl and PCRE
/^(a)?a/ matched against "a" leaves $1 unset.
</quote>
The last sentence does not indicate a bug. If the string "a" should match against the
regular expression /^(a)?a/, the last "a" in the regex must be matched by any literal
"a" in the string. The rest of the string is "", which obviously does not match
the first /^(a)/.
----
Manual Page -- http://www.php.net/manual/en/reference.pcre.pattern.syntax.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58559
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58559&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58559&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58559&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58559&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58559&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58559&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58559&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58559&report=yes
Search -- http://master.php.net/manage/user-notes.php