def dict_regex_lookup(the_dict, regex_str):
    """return all values in the dict where the key matches the regex.
    Params are the dict, and a string to be used as regex"""
    # add anchor characters if they're not explicitly specified to prevent T1001 from matching T1001.001
    regex_str = regex_str.strip()
    if not regex_str.endswith("$"):
        regex_str = regex_str + "$"
    if not regex_str.startswith("^"):
        regex_str = "^" + regex_str
    try:
        regex = re.compile(regex_str)
    except Exception as err:
        print(Fore.RED + "ERROR: cannot compile regex", regex_str, "because of", err, Fore.RESET)
        exit()
    values = []
    for key in the_dict:
        if regex.match(key):
            if "(" in key or ")" in key:
                continue
            values.append(the_dict[key])
    return values
return all values in the dict where the key matches the regex.
    Params are the dict, and a string to be used as regex
src/parse_mappings.py