Here is the regsub: it works as expected for the &. But the single quote, doubl, GT and LT are all appending the character as opposed to replacing it.
set xmlMsg [regsub -all {&} $xmlMsg “&”]
set xmlMsg [regsub -all {“} $xmlMsg “"”]
set xmlMsg [regsub -all {‘} $xmlMsg “'”]
set xmlMsg [regsub -all {<} $xmlMsg "<"] set xmlMsg [regsub -all {>} $xmlMsg “>”]
Here is the Original Segment:
REMOVE|’|”|&|>|<|
Here is the output of the regsub:
REMOVE|’apos;|quot;|&|>gt;|