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

using regular expressions

Expand Messages
  • jane_sedgewick
    Does NoteTab support back references in its regular expressions? I tried to use the following b{ w+} s+ 1 b to check for duplicate words, but it doesn t seem
    Message 1 of 3 , Nov 29, 2005
      Does NoteTab support back references in its regular expressions?

      I tried to use the following
      \b{\w+}\s+\1\b
      to check for duplicate words, but it doesn't seem to work although I
      can use it in other software supporting Regex. Is the {\w+} only
      referenced if used as replacement text?
    • rpdooling
      Jane, NoteTab does support backreferencing but it uses its own peculiar flavor of Regex. Look under Find/Replace Text in Help On Clip Programming. I think you
      Message 2 of 3 , Nov 29, 2005
        Jane,

        NoteTab does support backreferencing but it uses its own peculiar
        flavor of Regex. Look under Find/Replace Text in Help On Clip
        Programming. I think you will have to use \D (any nondigit character)
        instead of \w (which in NoteTab means any word delimiter) in your regex.

        Didn't test it to be sure, but it should work.

        notetab.chm::/regular_expressions.htm

        rpd

        --- In notetab@yahoogroups.com, "jane_sedgewick" <jane_sedgewick@y...>
        wrote:
        >
        > Does NoteTab support back references in its regular expressions?
        >
        > I tried to use the following
        > \b{\w+}\s+\1\b
        > to check for duplicate words, but it doesn't seem to work although I
        > can use it in other software supporting Regex. Is the {\w+} only
        > referenced if used as replacement text?
        >
      • rpdooling
        Jane, I spoke too soon, methinks. NoteTab supports tagged matches for the purpose of search and replace, but I can t see where it does backreferencing in the
        Message 3 of 3 , Nov 29, 2005
          Jane,

          I spoke too soon, methinks. NoteTab supports tagged matches for the
          purpose of search and replace, but I can't see where it does
          backreferencing in the fashion you are trying to use it. As you
          probably know the Clipbook will run Perl or Awk or Python scripts on
          your text if you have any of those on your machine. Perl & Awk are
          supported in the Clip Commands, and you can run Python scripts either
          with the GetDosOutput function or the RunScript command.

          There's also a separate Yahoo Group on clip programming:
          http://groups.yahoo.com/group/ntb-Clips/
          And another on scripts:
          http://groups.yahoo.com/group/ntb-scripts/

          which you might search for "duplicate words" and see if others have
          been here before you.

          Sorry about the bad info on the first reply

          rd



          --- In notetab@yahoogroups.com, "jane_sedgewick" <jane_sedgewick@y...>
          wrote:
          >
          > Does NoteTab support back references in its regular expressions?
          >
          > I tried to use the following
          > \b{\w+}\s+\1\b
          > to check for duplicate words, but it doesn't seem to work although I
          > can use it in other software supporting Regex. Is the {\w+} only
          > referenced if used as replacement text?
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.