how to split by words and punctuation in javascript
snippet in javascript

how to split by words and punctuation in javascript

user9362

string.split(/\s*\b\s*/)