For example: "This is some text . This is some text"
should be
"This is some text. This is some text"
We can use replase but replacing ' .' with '.', but it's not a good approach. Please let me know if you have any other idea which is generalised for any punctuation.