原 Python正則表達式--每日一點 屬性介紹

正則匹配後咱們須要對相關的屬性進行操做如下是一些基本的屬性介紹 m = re.match(r'(\w+) (\w+)(?P<name>.*)', 'hello python!') print("匹配時所用的文本 strng -------", m.string) print("Pattern對象 re -------", m.re) print("開始搜索的索引 pos -
相關文章
相關標籤/搜索