import re


def regex_negative_match(pattern, value):
    """
    Return False if the regex is "negative" and is a complete match for the
    supplied value, True otherwise.
    """
    if pattern[0] != '~':
        # this is a positive regex, ignore
        return True
    return not re.match(pattern[1:] + '\Z', value)