我需要对一个字符串应用多个正则表达式,如下所示:
regex = re.compile("...")
regex2 = re.compile("...")
regex3 = re.compile("...")
regex4 = re.compile("...")
if regex.match(string) == None and regex2.match(string) == None and regex3.match(string) == None and regex4.match(string) == None:
我想知道是否有另一种方法可以合并或组合单个正则表达式,或者我是否已经在用“正确的方法”进行合并?在
相关问题 更多 >
编程相关推荐