import re


def str_pattern_valid(sname, pattern_group):
    """
    Whether the sname matches the pattern in pattern_group
    """
    for patt_str in pattern_group:
        pattern = re.compile(patt_str)
        match = re.match(pattern, sname)
        if match is not None:
            return True
    return False