No, that doesn't work: it ends up using three coins (a dime and two pennies) for 12 cents, instead of two six-cent coins.
in reply to Re^2: The greedy change-making problem using regexes
in thread The greedy change-making problem using regexes
P.L., P.M., P.O.D, X.S.
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart