Manny,
Here is another:
set whatsis [string map {: “”} “10:25:30”]
echo $whatsis
102530
The string command is finding more favor these days since (according to Charlie Bursell and the other Tcl wizards) string is highly optimized.
I also find many of the string commands easier to use.
Oh and you can do this in an Xlate.
I prefer not to imbed the code directly but rather invoke an external xltp type proc. This allows me to construct reusable code and eliminates the annoyance of when I misplace a curly brace or square bracket and get debug information which gives me everything I don;t want to know about the Xlate and always seems to stop short of telling me where in my code Tcl had objections.
Mos timportant to me is the reusable code. Then the next time I need to do a string map, I just change the arguments to the proc. Non Tcl proficient folks can use the facility as well.
Jim Kosloskey
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.