python - 正则表达式匹配和原生字符的问题
阿神
阿神 2017-04-18 10:23:59
0
1
532
>>> m = re.search(r'\\\d','\8')
>>> if m is not None: m.group()

'\\8'

有哪位朋友能看得懂这个是怎么匹配出来的吗?能解释一下吗?

>>> m = re.search(r'\\\d','\\8')
>>> if m is not None: m.group()

'\\8'
阿神
阿神

闭关修行中......

reply all(1)
伊谢尔伦

if m is not None: print(m.group())


Your questions are all about the basic knowledge of python’s re module

Press F1 to read the user manual.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template