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

Re: [Clip] Help with "escaping" double quotes from an input control

Expand Messages
  • spanishfreak88
    ... ^$StrReplace, ... are ... was ... You are partially correct; I did omit the last two options, but not intentionally. I do have both in my clip, but forgot
    Message 1 of 6 , Sep 16 8:47 PM
      --- In ntb-clips@yahoogroups.com, hsavage <hsavage@p...> wrote:
      > First, some commands and functions have optional fields.
      ^$StrReplace,
      > as far as I know, doesn't have optional fields. The last 2 fields
      are
      > missing.
      >
      > You may have omitted the fields just for email purposes because it
      was
      > expedient.

      You are partially correct; I did omit the last two options, but not
      intentionally. I do have both in my clip, but forgot to type them in
      my post <:-I. My problem however does not appear to be a result of
      improper use of the command itself, but with the appearance of quotes
      within a string. In my example, +"easter eggs", (I think) notetab
      interprets the quotes as delimiters of the string easter egg and
      returns an error because the plus sign occurs outside of the quotes.
      What I need is some way to force notetab to accept the quotes as part
      of the string itself. BTW, the string is input via a wizard field as
      such: ^!Set %QueryString%=^?{Enter your search term here:=Keyword or
      phrase}. Therefore, if I type quotes in the text box as part of the
      search expression, they have to be converted into the url escape
      codes. Is it perhaps possible to achieve this with a regular
      expression? (It would really be helpful if notetab had an onkeypress
      sort of event handler...) Thanks in advance for any other responses.

      Craig Nicholson
    • Larry Thomas
      Hi Craig, ... The solution to your problem is to enclose all of the quotes in quotes. Example: change + eastereggs to + easter eggs . Regards, Larry
      Message 2 of 6 , Sep 16 10:06 PM
        Hi Craig,

        At 03:47 AM 9/17/03 -0000, you wrote:
        >My problem however does not appear to be a result of
        >improper use of the command itself, but with the appearance of quotes
        >within a string. In my example, +"easter eggs", (I think) notetab
        >interprets the quotes as delimiters of the string easter egg and
        >returns an error because the plus sign occurs outside of the quotes.
        >What I need is some way to force notetab to accept the quotes as part
        >of the string itself. BTW, the string is input via a wizard field as
        >such: ^!Set %QueryString%=^?{Enter your search term here:=Keyword or
        >phrase}. Therefore, if I type quotes in the text box as part of the
        >search expression, they have to be converted into the url escape
        >codes. Is it perhaps possible to achieve this with a regular
        >expression? (It would really be helpful if notetab had an onkeypress
        >sort of event handler...) Thanks in advance for any other responses.

        The solution to your problem is to enclose all of the quotes in quotes.
        Example: change +"eastereggs" to "+"easter eggs"".

        Regards,

        Larry
        lrt@... e¿ê
      • hsavage
        ... Craig, I tried to give the example of quoting all the strings but I didn t know you were using a wizard to collect the input for the string. The example
        Message 3 of 6 , Sep 17 6:09 AM
          spanishfreak88 wrote:

          >> wrote:
          >
          > You are partially correct; I did omit the last two options, but not
          > intentionally.
          >
          > What I need is some way to force notetab to accept the quotes as part
          > of the string itself.
          >
          > BTW, the string is input via a wizard field as
          > such: ^!Set %QueryString%=^?{Enter your search term here:=Keyword or
          > phrase}. Therefore, if I type quotes in the text box as part of the
          > search expression, they have to be converted into the url escape
          > codes. Is it perhaps possible to achieve this with a regular
          > expression? (It would really be helpful if notetab had an onkeypress
          > sort of event handler...) Thanks in advance for any other responses.
          >
          > Craig Nicholson

          Craig,

          I tried to give the example of quoting all the strings but I didn't know
          you were using a wizard to collect the input for the string. The
          example below should ensure the string, at creation, is surrounded by
          quotes.

          quote after first = quote after
          closing curly brace.
          ^!Set %QueryString%="^?{Enter your search term here:=Keyword or phrase}"

          Try this, see if it helps.

          hrs
        Your message has been successfully submitted and would be delivered to recipients shortly.