remove copywrite character

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf remove copywrite character

  • Creator
    Topic
  • #53063
    Mason Miller
    Participant

      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

      Code:


      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?

    Viewing 3 reply threads
    • Author
      Replies
      • #76416
        Jim Kosloskey
        Participant

          Mason,

          I just tried this:

          set junk “a@b”

          set stuff [string map

            $junk]

            $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.

        • #76417
          Mason Miller
          Participant

            Thanks I tried using

            set newmsg [string map [list

          • #76418
            Jim Kosloskey
            Participant

              Mason,

              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

                $junk resulted in ab

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #76419
              Mason Miller
              Participant

                Thanks the code was correct but the data I was testing with was incorrect.  ðŸ˜³

            Viewing 3 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.