Change regex from '[^S]*' pattern to '(?!S)'. This works better when the sequence being replaced appears in the middle of the string, rather than at the end.
Fix dotted abbreviations in the middle of a string: The regex '\b' matches transition from non-word to word (or word to non-word). Since '.' is a non-word, the seuqnce 'Abbrev.' doesn't have a \b at the end (period (non-word) to space (non-word) doesn't match '\b'). Add the option for a trailing space, but put it in a positive look-ahead, '(?=\s)', so the space is itself not stripped out by the regex replace.
Fix 'JUNCTION' : need to account for the first N, and make the I in IO optional.
Add tests for recent changes