python正则表达式总结

python进阶知识点巩固 一,正则表达式 使用正则表达式前引入re模块 import re 使用正则举例: import re text = ‘abcdesfgfsdf’ key = r’ab’ regex = re.compile(key) value = re.search(text,regex) print(value.group()) 1,re.compile函数 做用:用于生成一个pa
相关文章
相关标签/搜索