so the old adagio that "* is greedy" has an exception
No, it is always greedy, but its greed is not absolute. It will eat as much as it can, but if that results in failure to match, then it will relinquish some of what it ate (try not to picture that) to allow the whole expression to match. Greed (and the anti-greed of minimal-matching) is tempered by persistence in regexen.
Recently, hv wrote a tutorial explaining the rules the regex engine uses in trying to find a match.
Caution: Contents may have been coded under pressure.