Wow, great answers - I'm really glad I asked the question.
Now, more questions/comments...
- So, substr is more efficient than using a regex. It's only a small data set in this case, but useful to know in future.
- rindex is neat, didn't know about that before
- In duncdude's answer, you need...