摘要:
import re # 判断是否包含b # line = "booooooobby123" # regex_str = "^b.*" # if re.match(regex_str, line) : # print('yes') # 结果是bb 原因:正则表达式是一种贪婪的模式 一直会匹配到最后一种返回 line = 'booooooooobby123' regex_str = ".*... 阅读全文
posted @ 2019-05-31 22:58
邵邵
阅读(512)
评论(0)
推荐(0)
浙公网安备 33010602011771号