DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3730>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3730

Perl5Matcher sometimes confuses the begin/end offsets on similar sub patterns in a 
regular expression

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |LATER



------- Additional Comments From [EMAIL PROTECTED]  2001-09-19 15:36 -------
This behavior is consistent with Perl 5.003_07 and is not a bug.  The
contents of a group is not guaranteed to be the last succesful match
when contained within an alternation. In other words, group 18 is the
valid match while group 12 did not match anything on its last attempt.
In Perl5MatchResult, groups that failed to match on their last attempt
as part of the NFA are indicated when  the start offset is greater than
the end offset (this may be a documentation bug since it may not appear
in the javadocs) and when accessed via group(int) they return null.
Subgroups that weren't reached a final time during the NFA execution
(perhaps because an earlier subgroup failed) will retain their old values.

Later versions of Perl regularized the behavior of subgroups so that they
would always contain the last value matched rather than a potentially
empty value based on a final failed subgroup match attempt.  Perl5Matcher
will implement this behavior as part of the Perl 5.6 compatibility work.

Reply via email to