How to insert spaces in between abbreviated Strings A.B.C. to A. B. C.
How do I reformat abbreviated string that has not yet have spaces in between them and how do I ensure that those already with spaces that it does not add additional spaces. For example A. B.C. Company LTD to A. B. C. Company LTD
Re: How to insert spaces in between abbreviated Strings A.B.C. to A. B. C.
\b states that there was a word limit before the letter (so it wasn't preceded by another letter) ([A-Z]\.) captures the uppercase letter in group #1 (?=[A-Z]\b) is a non-consuming "lookahead" assertion that makes sure that it's followed by another single uppercase letter. You can replace it with (?!\s) if you just want to assert that it's not followed by a space (e.g. if you want to also replace in "A. B. C.Company" by "A. B. C. Company") Replace by "$1 ", the group #1 + a space.