How do I get a number based on the numbers on the end of a string