有人可以向我解释为什么这不匹配,而我收到的是不可接受的。
linesout = "test.host.com (10.200.100.10)"
pat = re.compile("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}")
test = pat.match(linesout)
if test:
print "Acceptable ip address"
else:
print "Unacceptable ip address"
谢谢