摘要: 分组 # 分组: () --> result.group(1) 获取分组中匹配内容 # 在分组的时候还可以结合 | : result = re.match(r"(\d{3}|\d{4})-(\d{8})$", phone) print(result) # 不需要引用分组的内容: result = r 阅读全文
posted @ 2022-08-23 14:38 测试圈的彭于晏 阅读(15) 评论(0) 推荐(0)