in reply to Capturing the nth word in a string

I understand your curiosity, and I totally support it. For everyone, not just you, claiming efficiency as a reason isn't so strong. The speed and memory difference on a small sentence, of say.. 20 words, might be nearly as fast as some other solutions.

Unless you are doing something that requires user interaction or is time dependent, if it works, and is somewhat readable, your solution is great. If you were dealing with a 5e10 words, yeah, efficiency would really matter. Who would want their machine to run out of memory?

It's like comparing the bubble sort to the merge sort to the quick sort on a small set of data. Oddly enough, bubble sort does really really well since the overhead is so low. But once the size gets significant, it does shitty. AND if you are performing an operation on a small set of data, not only on sorting, it doesn't really matter. It's readable, w/o your explanation. Horay! :)

Play that funky music white boy..