摘要: 正则表达式进行分组匹配,例如: 当我想匹配字符串末尾的!,不存在时,给一个默认值为not found import re str1 = "hello word!" str2 = "hello word" parttern = '(?P<first>hello) (?P<sec>word)(?P<th 阅读全文
posted @ 2023-02-14 16:57 TasteL 阅读(110) 评论(0) 推荐(0) 编辑