regsub help

  • Creator
    Topic
  • #49882
    Jared Miller
    Participant

    Trying to remove quote marks out of few fields and am having trouble getting it to work with regsub.

    I’ve tried several different formats but this is the most recent code I’ve tried:  

    regsub -all {[“]} $quote {} quote

    Thanks for any help provided…

Viewing 5 reply threads
  • Author
    Replies
    • #63993
      Rob Abbott
      Keymaster

      Your code works for me?

      You can also try

      regsub -all ” $quote {} quote

      Rob Abbott
      Cloverleaf Emeritus

    • #63994
      Jared Miller
      Participant

      Well, that’s wierd…It works for me too, but only if I enter a ” in SMAT and resend it.  If the quotes are already there from the registration system then the quote marks remain

    • #63995
      Rob Abbott
      Keymaster

      Is it possible they are sending two single quotes side-by side?  eg. ” vs “

      Rob Abbott
      Cloverleaf Emeritus

    • #63996
      Jared Miller
      Participant

      I tried it with a single quote and had no luck.  Here’s what is coming in the IN1 segment when no insurance is selected for example:  IN1|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””|””

      I did just notice that when I put “” in via SMAT and resent that message then it changed those marks to , but left the rest them alone.  It’s almost like all those quote marks aren’t even there.  We are going to be doing integrated testing the next few days so I’ll have to check the other analysts to see during that to see if they are getting quote marks at all.  I was just trying to be proactive…guess I learned to quit doing that!

    • #63997
      Charlie Bursell
      Participant

      If you are doing this in Xlate, depending on version, you may to also change the OB data type from null to ch.

    • #63998
      Tom Rioux
      Participant

      I’m sure this is a silly question since you know your sending system better than I do but here goes.  You mentioned that the sending system sends the quotes when no insurance is selected.  I know some systems actually send text to say “NO INSURANCE” or something to that matter.  Could it be that this is the sending systems way of deleting an insurance?

      Shot in the dark……but wanted to make sure all the bases are covered.

      I’ve done this in a proc before and this is how I got it to work:

      regsub -all {“”} $msg {} newmsg

      Hope you get it working!

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

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,296
Replies
34,439
Topic Tags
287
Empty Topic Tags
10