I originally used indexOf to find a space but I want to find any word boundary.
Something like this, but what regex?
var str = "This is a sentence",
firstword = str.search("");
return word;
I want to return "This". Even in the case of a tab, period, comma, etc.