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

Re: [Clip] Setting Variables from text

Expand Messages
  • Sheri
    ... That is true, but it seems kind of silly to be using arrays and getresubstrings when there is only one substring. You can use ^!Find to find a whole
    Message 1 of 4 , Dec 19, 2008
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:
      >
      > John,
      >
      > I believe you are a victim of a bug that arose in the latest
      > version of notetab and that has been reported. GetReSubstrings
      > will not work if there is just one substring! Add a second
      > substring and you will get what you want.

      That is true, but it seems kind of silly to be using arrays and
      getresubstrings when there is only one substring. You can use ^!Find
      to find a whole pattern or a substring, and assign ^$GetSelection$ to
      a variable.

      The original command given was

      ^!Find "^Source\=(.+)\R" RS

      and the ultimate variable (%source%) comes from substring 1.

      This pattern could be written so as to need no substrings. But for
      simplicity, I'm not changing the pattern.

      ^!Find "^Source\=(.+)\R" RS1
      ^!Set %source%=^$GetSelection$

      Regards,
      Sheri
    Your message has been successfully submitted and would be delivered to recipients shortly.