split at any punctuation javscript code example Example: how to split by words and punctuation in javascript string.split(/\s*\b\s*/)