Splitting a String by punctuation and whitespace using regex
807591May 16 2008 — edited May 17 2008Hello
I was wondering if anyone knew a way to split a string by punctuation and whitespace, for example let's say I have a string that says,
Man, he was fast. I've never seen that before!
and I want to use the split() method to split the string into the following array
\ "Man" \ "," \ "he" \ "was" \ "fast" \ "." \ "I've" \ "never" \ "seen" \ "that" \ "before" \ "!" \
where each backslash division above is equivalent to a cell in the array
if anyone could offer any suggestions or a place to look online that would be appreciated. I've tried looking online and in the API docs. I also tried several regex expressions to with no luck.