I have 3 different string vars like:
appleVar = "apple3"
pearVar = "pear1"
mangoVar = "mango4"
what is the best way to figure out which one has the highest number?
I thought about setting a new var from this:max(int(right(appleVar,1)),int(right(pearVar,1)),int(right(mangoVar,1)))
but then I only get the number and not the name. anyone have an idea how to get the name and the number?
EDIT: also I don't care about ties (apple2, pear2, mango2), in that case I'd take a random one.