taoshihan

必须加# 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

分类:

技术点:

相关文章:

  • 2021-09-07
  • 2021-12-18
  • 2021-09-17
  • 2021-12-28
  • 2021-12-28
  • 2021-09-17
  • 2021-11-14
  • 2021-12-28
猜你喜欢
  • 2021-09-07
  • 2021-11-27
  • 2021-09-17
  • 2021-09-17
  • 2021-11-27
  • 2021-12-28
相关资源
相似解决方案