必须加# encoding: utf-8否则报错
SyntaxError: Non-ASCII character 'xe6'
# encoding: utf-8 import re regex= ur"d{4}" #正则表达式 if re.match(regex,"2020-2-02"): print 111 else: print 222
返回111