(raw_string: Text)
return vars_list
extract all variable names from content, which is in format $variable

    Args:
        raw_string (str): string content

    Returns:
        list: variables list extracted from string content

    Examples:
        >>> regex_findall_variables("$variable")
        ["variable"]

        >>> regex_findall_variables("/blog/$postid")
        ["postid"]

        >>> regex_findall_variables("/$var1/$var2")
        ["var1", "var2"]

        >>> regex_findall_variables("abc")
        []
extract all variable names from content, which is in format $variable
extract all variable names from content which is in format $variable
def regex_findall_variables(raw_string: Text) -> List[Text]:
    """ extract all variable names from content, which is in format $variable

    Args:
        raw_string (str): string content

    Returns:
        list: variables list extracted from string content

    Examples:
        >>> regex_findall_variables("$variable")
        ["variable"]

        >>> regex_findall_variables("/blog/$postid")
        ["postid"]

        >>> regex_findall_variables("/$var1/$var2")
        ["var1", "var2"]

        >>> regex_findall_variables("abc")
        []

    """
    try:
        match_start_position = raw_string.index("$", 0)
    except ValueError:
        return []

    vars_list = []
    while match_start_position < len(raw_string):

        # Notice: notation priority
        # $$ > $var

        # search $$
        dollar_match = dolloar_regex_compile.match(raw_string, match_start_position)
        if dollar_match:
            match_start_position = dollar_match.end()
            continue

        # search variable like ${var} or $var
        var_match = variable_regex_compile.match(raw_string, match_start_position)
        if var_match:
            var_name = var_match.group(1) or var_match.group(2)
            vars_list.append(var_name)
            match_start_position = var_match.end()
            continue

        curr_position = match_start_position
        try:
            # find next $ location
            match_start_position = raw_string.index("$", curr_position + 1)
        except ValueError:
            # break while loop
            break

    return vars_list
def regex_findall_variables ( raw_string : Text ) -> List [ Text ] : try : match_start_position = raw_string . index ( "$" , 0 ) except ValueError : return [ ] vars_list = [ ] while match_start_position < len ( raw_string ) : # Notice: notation priority # $$ > $var # search $$ dollar_match = dolloar_regex_compile . match ( raw_string , match_start_position ) if dollar_match : match_start_position = dollar_match . end ( ) continue # search variable like ${var} or $var var_match = variable_regex_compile . match ( raw_string , match_start_position ) if var_match : var_name = var_match . group ( 1 ) or var_match . group ( 2 ) vars_list . append ( var_name ) match_start_position = var_match . end ( ) continue curr_position = match_start_position try : # find next $ location match_start_position = raw_string . index ( "$" , curr_position + 1 ) except ValueError : # break while loop break return vars_list