摘要:
#_author:Star#date:2019/11/8#正则表达式的方法#1. findall()-->所有的结果都返回到一个列表里#2. search() >返回匹配到的第一个对象,对象可以调用group()方法返回结果#3. match() >只在字符串开始匹配,,对象可以调用group()方 阅读全文
摘要:
#_author:Star#date:2019/11/8#1.[]字符集import reret=re.findall('a[c,d,e]b','aeb')print(ret)#aebret1=re.findall('[a-z]','axb')print(ret1)#['a', 'x', 'b']# 阅读全文