Javascript – How do I split a sentence into words and punctuation?
I want to replace any word that follows a certain condition in a text, with another word, which varies, depending on the first word. The possibilities of the other word is stored in an array, and the index of the…