def _re_fact(rex: Union[str, Regex, Pattern]) -> Regex: return rex if isinstance(rex, Regex) else Regex.cons(rex)