Using instrRev and getting the second to last instance of a string
Posted on 2007-07-29
I am looking for code to find the next to last instance of a string.
For example, if the string I am reading (from a text file) is "Miami, FL, United States" I want to pull "FL" from that string.
The string I am reading is not always in this format (it's someone else's file) from the start of the string. However, I always has the state then united states, so I basicaly want to 'read backwards' from to the second to last comma.
I know I can use InstrRev but not how to grab the second to last, basically