def match_check(self, regex, fun):
        vals = []
        if isinstance(fun, str):
            fun = [fun]
        for func in fun:
            try:
                if re.match(regex, func):
                    vals.append(True)
                else:
                    vals.append(False)
            except Exception:
                log.error('Invalid regular expression: {0}'.format(regex))
        return vals and all(vals)
Validate a single regex to function comparison, the function argument
dataset/ETHPy150Open saltstack/salt/salt/utils/minions.py/CkMinions.match_check