|
|
| "be consistent" | |
| PerlMonks |
Re^2: Why machine-generated solutions will never cease to amaze meby hv (Parson) |
| on Nov 11, 2004 at 13:34 UTC ( #407031=note: print w/ replies, xml ) | Need Help?? |
|
The proof for the (x?|y) case follows immediately from regex union being commutative. Regexp union is not commutative when one of the alternates is a leading substring of another: then order becomes important - (E|x) will always match E in preference to x. It is the presence of the outer anchors in the original pattern that disambiguates and thus makes it commutative. Hugo
In Section
Meditations
|
|
||||||||||||||||||||||