import re


def check_property_with_regex(key, regex, data):
    """Checks if the contents of data[key] matches the given regex

    :param: key: key to find in data
    :param: data: dict to search
    :type: data: dict
    :param: regex: regular expression to check against
    :type: regex: str
    :rtype: bool
    """
    value = data.get(key)
    if value is None:
        return False
    pattern = re.compile(regex)
    return pattern.match(value) is not None