For python string template is there a clean way to extract the variable names in the template string.
I actually want to to be able to write template stings into a textfield on and then substitue the variables for other more complex looking variables.
So for example I would get user inputted template into a variable
t = Template(( request.POST['comment'] ))
the comment string maybe
'$who likes $what'
I need an array of the variables names so I can convert the string to something like
{{{who}}} likes {{{what}}}
Maybe there is also a better way to approach this.