您的位置: 首页 > 文章 > Python——Re库、match对象、Re库的贪婪匹配和最小匹配 Python——Re库、match对象、Re库的贪婪匹配和最小匹配 分类: 文章 • 2024-06-24 20:50:52 Re库的主要功能函数 一、search函数 re.search(pattern,string,flags=0) flags search函数举例 match函数: findall函数: match对象 贪婪匹配和最小匹配: 操作符后加 ?获得最小匹配结果