封装一个原本重复使用的正则表达式 prog = re.compile(pattern) result = prog.match(string) 转载于:https://www.cnblogs.com/sea-stream/p/11190439.html