import rerx = r"\.(?=\S)"s = "Text1. Text2.Text3."result = re.sub(rx, ". ", s)print(result)
Standard input is empty
Text1. Text2. Text3.
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!