python带多demo的正则表达式
正则表达式
用途
1.判断用户输入的数据是否符合你的要求(用户名,密码等)
2.爬虫,数据清洗
正则表达式概述
re模块操作
简单举例
import re
# re.match(正则表达式, 要处理的字符串)
result = re.match(r'hello', 'hello world')
result1 = re.match(r'Hello', 'hello world')
result2...
原创
2020-04-21 11:24:25 ·
364 阅读 ·
0 评论