我正在编写一个脚本,用 Python 将文本拆分成句子。但是,我不擅长编写更复杂的正则表达式。
有 5 条规则,我希望根据这些规则拆分句子。我想拆分句子,如果他们:
* end with "!" or
* end with "?" or
* end with "..." or
* end with "." and the full stop is not followed by a number or
* end with "." and the full stop is followed by a whitespace
Python 的正则表达式是什么?