我想问一个与上一个问题稍有不同的问题(从字符串中删除新行):
我想从字符串中删除新行,除非在新行上的文本之前有一个空格“ ”(这表明这是一个新段落。这是一个例子:
This is the first bit of text. It continues for a while until
there is a line break. It then continues for a bit longer but
the line break also continues alongside it.
What you see here is the second paragraph. You'll notice that
there is a space to mark the beginning of the paragraph. However
When joining these lines, a computer may not realize that the next
paragraph exists in this way.