def extract_variables(content):
try:<EOL><INDENT>return re.findall(variable_regexp, content)<EOL><DEDENT>except TypeError:<EOL><INDENT>return []<EOL><DEDENT>
extract all variable names from content, which is in format $variable
    @param (str) content
    @return (list) variable name list

    e.g. 
    print(extract_variables("abc")); # => []
    print(extract_variables("$variable")); # => ["variable"]
    print(extract_variables("http://$url")); # => ['url']
    print(extract_variables("/blog/$postid")); # => ["postid"]
    print(extract_variables("/$var1/$var2")); # => ["var1", "var2"]