Getting first paragraph of a string
Posted: 24 Mar 2020 17:24
Good evening everybody.
I would need to extract the first paragraph of a string, id est the part before the first couple of line returns (\n\n)
For example:
"We had wanted to leave at 20.
But we left at 22"
What I would like to get is "we had wanted to leave at 20".
I guess I have to use the two line feed, for I realized I sometimes put a space after the full stop, so that I guess I cannot use it...
I know I should use regex but that's still.beyond me.
Any hint?
Thank you, have a nice evening.
I would need to extract the first paragraph of a string, id est the part before the first couple of line returns (\n\n)
For example:
"We had wanted to leave at 20.
But we left at 22"
What I would like to get is "we had wanted to leave at 20".
I guess I have to use the two line feed, for I realized I sometimes put a space after the full stop, so that I guess I cannot use it...
I know I should use regex but that's still.beyond me.
Any hint?
Thank you, have a nice evening.