Quoting from the minutes of the June 1995 POSIX RE experts meeting
recently forwarded by David Korn:
> To resolve Interp #43, Part 14, add on page 77, Section
> 2.8.2 of P1003.2 after sentence ending on line 2792,
> "An enclosed subpattern is deemed to be to the right of
> an enclosing pattern.
This resolution means the matching priority is determined by a
preorder traversal of subpatterns in the RE's parse tree. For
example, when matching /((week|wee)(night|knights))(s*)/ against
"weeknights", /(week|wee)/ is deemed to be the right of its enclosing
pattern /((week|wee)(night|knights))/, and therefore
/((week|wee)(night|knights))/ must match "weeknights" and /(week|wee)/
must match "wee".
This interpretation is consistent with RE-CONCAT interpretation (1).
It contradicts RE-CONCAT interpretation (2), because RE-CONCAT(2)
requires that /(week|wee)/ must match "week" in the same example.
I see that Andrew Hume writes that RE-CONCAT(2) is "simply wrong" and
that RE-CONCAT(1) is correct. This also agrees with the June 1995
minutes.
Since RE-CONCAT(2) is rejected, I'll assume RE-CONCAT(1) in my next
message, which will be about RE-ASSOC.
|