Loading ...
Sorry, an error occurred while loading the content.

20927escaping a character in an array

Expand Messages
  • Lee Underwood
    Aug 11, 2010
      I have the following clip and am trying to add the following item to the array, as one complete data item:

      official website; BBC profile

      The obvious problem is that it uses the semi-colon (";"), which is also used to separate the data items. I have tried using the backslash, e.g.,

      official website\; BBC profile

      but that didn't work. Any one have any ideas?

      Lee


      --- BEGIN CLIP ---
      :Sources
      ^!ClearVariables
      ^!Set %Row%=^$GetRow$
      ^!Set %Col%=^$GetCol$
      ^!SetArray %Word%=advocacy website;AFP report;Al Jazeera report;AP report;BBC backgrounder;BBC profile;official website; BBC profile;BBC profiles;BBC report;CFR backgrounder;CFR backgrounders;GlobalSecurity backgrounder;Guardian backgrounder;Haaretz report;JURIST news archive;JURIST report;JURIST reports;materials;memorandum, PDF;official profile;opinion, PDF;press release;Reuters report;text;text, PDF;transcript
      ^!Set %Count%=^%word0%; %IDX%=1

      :FindWord
      ;^!Jump 1
      ^!SetCursor ^%Row%:^%Col%
      :Loop-FindWord
      ^!replace "[^%word^%IDX%]" >> "" TAS
      ^!IfError NextWord

      :NextWord
      ^!If ^%IDX%=^%Count% Done
      ^!Inc %IDX%
      ^!Goto FindWord

      :Done
      ^!SetCursor ^%Row%:^%Col%
      ^!Replace "^%SPACE%," >> "," TAS
      ^!SetCursor ^%Row%:^%Col%
      ^!Replace "^%SPACE%." >> "." TAS
      ;^!Jump DOC_START
      ^!SetCursor ^%Row%:^%Col%
      ;^!Save
      ^!Info [L]The Clip has finished ...
      --- END CLIP ---
    • Show all 7 messages in this topic