Replacing a comma in a list

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Replacing a comma in a list

  • Creator
    Topic
  • #51614
    Manny Zachodin
    Participant

    I have a name of a provider that has a comma in it ” HEALTH HERO NETWORK, INC”.  Is there a substitute function in TCL to handle this specific case? I tried to use REGSUB with no success. I would like to use the function in xlate.  Thank you very much for your help.

Viewing 1 reply thread
  • Author
    Replies
    • #70984
      Chris Williams
      Participant

      You can use the “map” subfunction of the “string” command.

      Code:

      set newString [string map {, {}} $oldString]


      The bit between the braces is a list of pairs, in this case converting a comma to a null. You are not limited to a single pair.

    • #70985
      Manny Zachodin
      Participant

      Chris. Thank you very much for your help. I will try it now.

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

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10