So I have some sentences like:
The window is over there. The lamp is on. The fire is burning.
When I split it using split(‘.’) and then join it with newlines, it loses the “.”
Then I tried regex like (?<=\.)\s but it produces a space before the first letter of the second and third letters:
The window is over there.
The lamp is on.
The fire is burning.
I don’t want that extra space. I want:
The window is over there.
The lamp is on.
The fire is burning.
Thanks
1 Answer