def any_of(s): """s must be in the right format. See https://docs.python.org/3/library/re.html#regular-expression-syntax .""" return wrap('[', Dinant(s, escape=False), ']') # another helper function