0
有沒有一種方法可以使用正則表達式來將txt文件分成段落?Python正則表達式將txt文件分成段落
舉個例子,如果這是我的文本文件:
They call for you: The general who became a slave; the slave who became a gladiator; the gladiator who defied an Emperor. Striking story.
Watch your thoughts, for they will become actions. Watch your actions, for they'll become...habits. Watch your habits for they will forge your character. Watch your character, for it will make your destiny.
我會想到的是,\ S這裏所涉及的,但如何你決定只尋找在正則表達式換行,而不是空白?
感謝您的幫助。