2017年11月6日

Python3 re模块正则表达式中的re.S

摘要: 在Python的正则表达式中,有一个参数为re.S。它表示“.”(不包含外侧双引号,下同)的作用扩展到整个字符串,包括“\n”。看如下代码:import re a = '''asdfsafhellopass: 234455 worldafdsf ''' b = re.findall('hello(.*?)world',a) c = re.findall('hello(.*?... 阅读全文

posted @ 2017-11-06 16:26 lucaq 阅读(502) 评论(0) 推荐(0) 编辑

导航