python3.5 正则表达式re.X模块 不起作用
黄舟
黄舟 2017-04-18 10:24:25
0
2
600

如图:

import re
tel=r"""
...\d{2,3}
...-
...\d{6}
..."""
print(re.findall(tel,'102-123456'))
print(re.findall(tel,'102-123456',re.X))

显示:
[]
[]

不知道是程序哪里出问题了,请指教。

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
Ty80

Tell me what the dots in front are
←_←

伊谢尔伦

tel=r"\d{2,3}-\d{6}"

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template