Malcolm McLean said:It's slightly easier to write a greedy matcher. So probably that's what
they did, and wrote the specifications afterwards.
Right, they couldn't possibly have thought about the design before they
implemented it. (That was sarcasm.)
No it's not. If you call a pattern on an input with overlapping
sequences, almost certainly you haven't thought through the output
you actually want. The fix is usually to extend the pattern.
Perhaps you could try not making assumptions about what others have or
haven't thought through.