Originally posted by Mike Wilson
I am having some issues replacing characters. Any ideas?
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;|<lt;|
I would expect the original character im replacing to be removed. Its like the & is acting as a placeholder for the original character... Any thoughts? Thanks.