Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › remove copywrite character
I am trying to write a tcl proc that will remove the copywrite character (hexA9) but regsub or string map will not reconizie the pattern.
i have tried
regsub -all — {xA9} $msg {} newmsg
and
set newmsg [string map [list {xA9} “”] $msg]
is there something special I need to do so the proc will reconize the hex character?
Mason,
I just tried this:
set junk “a@b”
set stuff [string map
$stuff now contains ab (the @ removed)
That seems to work fine.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
Thanks I tried using
set newmsg [string map [list
Oops need new glasses. I used @ instead of the circle c.
OK just did this:
append junk a
append junk xa9
append junk b
That made $junk = ab
then string map
Thanks the code was correct but the data I was testing with was incorrect. 😳