原 Python正则表达式--每日一点 属性介绍

正则匹配后咱们须要对相关的属性进行操做如下是一些基本的属性介绍 m = re.match(r'(\w+) (\w+)(?P<name>.*)', 'hello python!') print("匹配时所用的文本 strng -------", m.string) print("Pattern对象 re -------", m.re) print("开始搜索的索引 pos -
相关文章
相关标签/搜索