Given the following pattern: "##-##-##", where "##" represents a 1 or 2 digit integer, what is the best way to separate the numbers?
Some background: I have an array of NSString objects. From this array I create a new mutable array, converting some of the strings into NSNumbers (this is working). Some of the strings have the pattern shown above (the pattern represents wins, losses and ties). I want to add to the mutable array, the string (as is) as well as the wins, losses, and ties as NSIntegers.
I don't know if it would be better to use an NSScanner or NSRegularExpression. I have not used either of these before and I'm not sure how to set them up and return the info that I need.
Thanks in advance,
Brad