For minimal matches, the “left-most-longest” should be replaced by “left-most-shortest”
Which is exactly what the shown match is: the shortest match from the left-most possible position. “Left-most” always takes precedence over all other rules. I guess this doesn’t get emphasised enough.
(Was that your point?)
Makeshifts last the longest.
In reply to Re: “Minimal” matching isn’t…
by Aristotle
in thread The "anchor" misnomer in regexes
by japhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |