in reply to Re^2: Counting words
in thread Counting words

Yeah, "last if" is a good call, I wasn't thinking. The OP wasn't clear exactly how they wanted the results back (string or array of words), so I choose string. Nice convert to array though.

As far as [^\s] versus \S, force of habit. If my laziness virtue would kick in like its supposed to, I'd have switched to \S by now and saved some keystrokes :)

-jbWare