How can I add a space after the ending dot of a sentence? So dots like in
"1.2" should be unaffected. Also if there is already a space, then there should not be a space added.
text1 = "This is a sample text. Just 1.2 to test.To add a space after the dot...Okay."
"This is a sample text. Just 1.2 to test. To add a space after the dot... Okay. "
EDIT: As pointed out in the comments: The text could also end and start with a number:
text2 = "I watched football.10 people played in 2 teams, my friend was player number 7. 20 minutes later the game ended with the score 2:1.Then I went home."