Javascript Code Fix Punctuation by Ensuring Spaces after Periods, Commas, Question Marks

Javascript Code Fix Punctuation by Ensuring Spaces after Periods, Commas, Question Marks, Exlamation Point - ie [from this.Sentence to?This] to [from this. Sentence to? This]

Home Short:

Below is a very complicated regex pattern for fixing the puctuation in a string so the places where there are periods, commas, question marks, and exclamation points have a space after but a space is not added in places where it shouldn't be such as in number and times, etc.

The regex code below is such that any of these characters get a space after them, where appropriate ,.!?:; so for example if you want to change it so that the spaces is only applied to periods, question marks, exclamation points but not colon or semicolon just change that to ,.!?.

If you want to remove colon and semi colon then the code to use would be ...

S
H
A
R
E