def METHOD_NAME(value: str) -> str:
    """Raise exception is subnet IDs fail to match constraints."""
    subnet_id_pattern = r"^(subnet-[0-9a-f]{8}|subnet-[0-9a-f]{17})$"
    for subnet in value:
        if not re.match(subnet_id_pattern, subnet):
            return rf"satisfy regular expression pattern: {subnet_id_pattern}"
    return ""