Don't you need to check for general white-space here?
I.E. not /\S+/