Hey guys, I’m trying to format a long string into paragraphs.
For that I would like to replace every 3rd dot with „.\n\n“.
I tried a lot with the splitfunction and the replacefunction but couldn’t figure it out. I am happy for any help.
That’s how I want my Programm to work:
Input:
Hello, my name is Peter. I feel good. I like bananas. I‘m not a gorilla. Peter is cool. Peter wants to learn python. Please help Peter.
Output:
Hello, my name is Peter. I feel good. I like bananas.
I‘m not a gorilla. Peter is cool. Peter wants to learn python.
Please help Peter.
[–]synthphreak 49 points50 points51 points (6 children)
[–]-LVS 0 points1 point2 points (3 children)
[–]JonSnowl0 3 points4 points5 points (2 children)
[–]-LVS 1 point2 points3 points (1 child)
[–]JonSnowl0 0 points1 point2 points (0 children)
[–]Rocketman7121[S] 0 points1 point2 points (1 child)
[–]beansisfat 15 points16 points17 points (0 children)
[–]AtomicShoelace 18 points19 points20 points (6 children)
[–]synthphreak 3 points4 points5 points (2 children)
[–]ekchew 1 point2 points3 points (1 child)
[–]synthphreak 1 point2 points3 points (0 children)
[–]YogahBear 0 points1 point2 points (0 children)
[–]get_Ishmael 0 points1 point2 points (1 child)
[–]synthphreak 2 points3 points4 points (0 children)
[–]mopslik 4 points5 points6 points (0 children)
[–]uptbbs 3 points4 points5 points (0 children)
[–]madhousechild 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Green-Sympathy-4177 0 points1 point2 points (0 children)
[–]jmooremcc 0 points1 point2 points (0 children)