def assert_any_match_regex(pattern, values, message="expected at least one %(values)r to match %(pattern)r", msg=None):
    """Assert that at least one value in an iterable matches a regex pattern.

    Args:
    pattern -- a regex.
    values -- an iterable of values to test.

    Raises AssertionError if all values don't match.

    """
    if msg:
        warnings.warn("msg is deprecated", DeprecationWarning)
        message = msg

    for value in values:
        if re.match(pattern, value) is not None:
            return

    raise AssertionError(message % {'values': values, 'pattern': pattern})
dataset/ETHPy150Open Yelp/Testify/testify/assertions.py/assert_any_match_regex/original