Forum Discussion
hooleylist
Mar 30, 2009Cirrostratus
Hi Carl,
You can use variables with string map, but you cannot use them with curly braces. In TCL curly braces generally prevent variable substitution. They're nice to use to avoid having to escape metacharacters.
If you want to allow variable expansion, you can use quotes or the list command:
set updated_string [string map "$find $replace" $original_string]
Aaron