📅  最后修改于: 2022-03-11 14:46:11.745000             🧑  作者: Mango
import re
def split_on_empty_lines(s):
# greedily match 2 or more new-lines
blank_line_regex = r"(?:\r?\n){2,}"
return re.split(blank_line_regex, s.strip())