【Python讀書筆記】正則表達式 2018-06-06

\1 典型問題:python python 下面的正則表達式爲何加上\1就能匹配到 不加就匹配不到  p = re.compile(r'\b\w+\s+') 或者寫成 p = re.compile(r'(\b\w+)\s+') print p.search('Paris in the the spring spring ').group() 輸出結果爲 'Paris' 而變爲 p = re.com
相關文章
相關標籤/搜索