Commits

Ned Batchelder committed 57f348c

A less-weird weird line

Comments (0)

Files changed (1)

 def join_regex(regexes):
     """Combine a list of regexes into one that matches any of them."""
     if len(regexes) > 1:
-        return "(" + ")|(".join(regexes) + ")"
+        return "|".join(["(%s)" % r for r in regexes])
     elif regexes:
         return regexes[0]
     else: