Forum Discussion
Carl_Brothers
Employee
Mar 30, 2009string map - Does it accept variables
Here is the case I am working around and hopefully it is just my ignorance of TCL constructs:
One SAP portal responds to many FQDNs and the FQDN determines to a small extent what the customer ...
hoolio
Cirrostratus
Mar 30, 2009Hi 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
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects