Python的正則表達式

正則表達式 1.re模塊 在Python中需要通過正則表達式對字符串進⾏匹配的時候,可以使⽤⼀個模 塊,名字爲re 1.1 re模塊的使⽤過程  re模塊示例 import re result = re.match(r"python", "python.hello") result.group() 輸出結果:python 說明:re.match() 能夠匹配出以xxx開頭的字符串   1.2
相關文章
相關標籤/搜索