import six


def _match_progs(value, progs):
    """Check if `value` (as string) is matching any of the compiled regexes in
    the `progs` list.
    """
    if not progs:
        return True
    for prog in progs:
        if prog.search(six.text_type(value)):
            return True
    return False