re.split() 分割文本

# --*-- coding:utf-8 --*--

import re

#  用特定字符去分割文本全文
test_str = "第1章第一条哈哈哈哈哈会大幅度 第二章案件发奖金第三条阿道夫"
ret = re.split(r"(第\w+?[章条])", test_str)
print(ret)

猜你喜欢

转载自blog.csdn.net/Rouckie/article/details/86541951