匹配时间: # -*- coding:utf-8 -*- import re def parseDate(l): patternForTime = r'(\d{4}[\D]\d{1,2}[\D]\d{1,2}[\D]?)' for i in l: m = re.search(patternForTime, i) if m: print(m.group(1)) if __name__ == '__main__': l = ['永康市雅致医疗器械有限公司', '郑云燕', 'II类:6863-16-…
import re u = "http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+" def match_by_re(str): pattern = re.compile(u, re.S) res = pattern.findall(string=str) if res: return res[0]…