I have to split a text into words using both spaces and punctuation as delimiters.
Punctuation includes characters like .,!?:;'"-
I am using the split function as it follows:
wordsArray = strLine.split("[.,!?:;'\"-]+\\s*");
However, this only splits my text by spaces and ignores other characters I've set as delimiters.
Obviously, I am new at regexes and I could use your help.