stripping quote mark > " < from the NTE segme

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf stripping quote mark > " < from the NTE segme

  • Creator
    Topic
  • #49791
    Duy Nguyen
    Participant

    I have an end system that will not permit open-ended quotes in the NTE SEGMENT.

Viewing 1 reply thread
  • Author
    Replies
    • #63610
      Robert Milfajt
      Participant

      Duy Nguyen wrote:


      NTE|9||Testing performed with the Sensititre YeastOne (YO6)

      If you want to strip out all quotes string map is probably best.  If however, you only want to strip out the quote if it is part of an open-quoted line, then you may need to get more creative.

      Could your lines have multiple quotes, i.e., “text” more text “and” more?  Or are you only going to have cases with one or two instances of “?

      Hope this helps,

      Robert Milfajt
      Northwestern Medicine
      Chicago, IL

    • #63611
      Tom Rioux
      Participant

      Assuming you will only have one or two quotes per line, you can do something like the following:

      set text $xlateInVals

      set num [regsub -all {“} $text {} newtext]

      if {$num ==1} {

        set xlateOutVals $newtext

      } else {

        set xlateOutVals $text

      }

      This should remove all open ended quotes but leave those quotes that are matching.  If you have more than 2 quotes per line, as suggested by Robert, then you may need to come up with something different

      Hope this helps…

      Tom Rioux

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

Forum Statistics

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