问问题
641 次
2 回答
6
于 2013-05-15T00:19:09.503 回答
-2
Well, a dot is a special character in a regex pattern. So if you want to sepcify a dot you need to escape the special charactr dot like that:
import re
regx = re.compile('\.ab..')
ss = ',ab123 .ab4578 !ab1298 .abUVMO'
print regx.findall(ss)
# result: ['.ab45', '.abUV']
于 2013-05-15T00:23:37.867 回答