The wikipedia article on PEG states:
The fundamental difference between
context-free grammars and parsing
expression grammars is that the PEG’s
choice operator is ordered. If the
first alternative succeeds, the second
alternative is ignored. Thus ordered
choice is not commutative, unlike
unordered choice as in context-free
grammars and regular expressions.
But this question has discovered that if the alternatives are substrings of each other; then regexes do not behave according to unordered choice. The wiki is correct for most part but does not take care of this edge condition. Am I correct in my assessment ?
“regex” != “regular expression”. The latter are pure and simple and of interest only to theoretical computer scientists and symbolic mathematicians.
“ordered choice” is an implementation option of regex processors.
You say “if the alternatives are substrings of each other; then regexes do not behave according to unordered choice”.
A much more correct statement would be “Some regex processors use ordered choice for ALL alternations. This becomes noticeable when an alternative is a prefix of another.”