def get_environment_var_name_from_string(string):
    """ 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
