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

RE: [Clip] Replacing quotation marks in clip variables

Expand Messages
  • Jamal Mazrui
    The following seems to work: ^!SetCode %working%=^$StrReplace( ; ;^%working%;False;False)$ Regards, Jamal ... From: ntb-clips@yahoogroups.com
    Message 1 of 1 , Dec 20, 2005
      The following seems to work:

      ^!SetCode %working%=^$StrReplace(""";"\'";^%working%;False;False)$

      Regards,
      Jamal

      -----Original Message-----
      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On
      Behalf Of karlheinznoise
      Sent: Tuesday, December 20, 2005 11:36 AM
      To: ntb-clips@yahoogroups.com
      Subject: [Clip] Replacing quotation marks in clip variables


      Hello, all. I've been working with NoteTab for a while now, but I
      just joined this group. I need some help with clip programming, but I
      can't find anything in the standard help file.

      I'm writing a PHP library (mostly as a way to learn PHP), and I'm
      trying to make a clip that will modify the contents of a print()
      command to make it PHP-safe. This means replacing tabs with \t,
      newlines with \n, etc. I've managed to do this without much trouble
      so far.

      What I'm having trouble with is the quotation marks. I can replace
      SINGLE quotes this way:

      ^!SetCode %working%=^$StrReplace("'";"\'";^%working%;False;False)$

      (%working% is just a variable containing the user content to be
      modified.)

      Obviously this won't work for double-quotes, and as far as I know,
      NoteTab doesn't have a token for this.

      Help?

      -Karl.









      Fookes Software: http://www.fookes.us, http://www.fookes.com
      Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm

      Yahoo! Groups Links
    Your message has been successfully submitted and would be delivered to recipients shortly.