文章目录一、正则表达式1、概念2、常用正则表(元字符)3、代码示例二、re模块1、re模块的使用1.1、findall(pattern,string,flags = 0 )用法1.2、re.match(pattern,string,flags = 0 )用法1.3、re.search(pattern,string,flags = 0 )用法1.4、re.finditer(pattern, string, flags=0)用法1.5、re.sub(pattern,repl,string,count