Check whether a string matches the outline of an IPv4 address,
       allowing "*"  as a wildcard

def is_valid_ip_pattern(ip):
    """Check whether a string matches the outline of an IPv4 address,
       allowing "*"  as a wildcard"""
    ip = ip.replace('*', '1')
    try:
        socket.inet_aton(ip)
        return True
    except socket.error:
        # Not a valid IPv4 address pattern
        return False