|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
>>> re.search(r'(([01]{0,1}\d{0,1)\d|2[0-4]\d|25[0-5])\.){3}([01]{0,1}\d{0,1)\d|1[0-4]\d|25[0-5])','192.168.1.1')
Traceback (most recent call last):
File "<pyshell#14>", line 1, in <module>
re.search(r'(([01]{0,1}\d{0,1)\d|2[0-4]\d|25[0-5])\.){3}([01]{0,1}\d{0,1)\d|1[0-4]\d|25[0-5])','192.168.1.1')
File "D:\python3.5.1\lib\re.py", line 173, in search
return _compile(pattern, flags).search(string)
File "D:\python3.5.1\lib\re.py", line 293, in _compile
p = sre_compile.compile(pattern, flags)
File "D:\python3.5.1\lib\sre_compile.py", line 536, in compile
p = sre_parse.parse(p, flags)
File "D:\python3.5.1\lib\sre_parse.py", line 834, in parse
raise source.error("unbalanced parenthesis")
sre_constants.error: unbalanced parenthesis at position 40
错误没看懂 |
|