搜索

首页  >  问答  >  正文

python - 正则表达式匹配和原生字符的问题

>>> 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'
阿神阿神2871 天前523

全部回复(1)我来回复

  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:25:59

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


    你的问题都是python的re模块的基础知识

    按F1,看用户手册。

    回复
    0
  • 取消回复