You are making this more difficult than it needs to be. Use the string map command instead. This command accepts a list of pairs where the first character of a pair is the part to find and teh second is the replacement.
For example
set replList
set str “1\2/3-4.5}6”
set newstr [string map $replList $str]
echo $newstr
123456
In most cases the string map command is much faster plus you don’t have to escape as much.
The message leaves the sending system with a [ character in the NTE segment, but when it gets to the inbound Cloverleaf thread, it has a value of xe2 for that character.
Here’s the message coming out of the sending system (all identifying data has been altered):