def var_name(string: str) -> str:
    """Strips out the Variable name from a string
    :param string: e.g. $MY_PATH:$YOUR_PATH
    :return string: e.g. MY_PATH
    """
    key = ""
    for char in string:
        if char.isalpha() or char.isdigit() or char == "_":
            key += char
        else:
            return key

    return key