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
相关文章
相关标签/搜索