我想匹配31 \ 05 \ 2017
的所有日期我试过了:
b=re.compile(r'31\05\2017')
b=re.compile('31\05\2017')
b=re.compile('31\\05\\2017')
b=re.compile(r'31\\05\\2017')
以及我使用的模式,下面的代码给出相同的结果
c=b.search('31\05\2017')
print(c.group())
给出'31 \ x05 \ x817'
如何获得31 \ 05 \ 2017
而不是null和其他字符正在打印