因为您应该将传递给
re.I而
compile()不是
match()。
>>> pattern = re.compile(r'^9', re.I)>>> a=pattern.match(teststring)>>> print a<_sre.SRE_Match object at 0x1140168>
欢迎分享,转载请注明来源:内存溢出
因为您应该将传递给
re.I而
compile()不是
match()。
>>> pattern = re.compile(r'^9', re.I)>>> a=pattern.match(teststring)>>> print a<_sre.SRE_Match object at 0x1140168>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)