
当使用python的re模块进行模式匹配时,有时需要忽略大小写,只需在re中进行.search()将参数re添加到函数中.IGNORECASE即可。
相关推荐:Python教程
mystring='somestring' pattern='somepattern' match=re.search(pattern,mystring,re.IGNORECASE)

当使用python的re模块进行模式匹配时,有时需要忽略大小写,只需在re中进行.search()将参数re添加到函数中.IGNORECASE即可。
相关推荐:Python教程
mystring='somestring' pattern='somepattern' match=re.search(pattern,mystring,re.IGNORECASE)