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

Re: [NTS] Re: Dot matching newlines??

Expand Messages
  • Alan C
    ... I m a subscriber at next http://www.theperlreview.com/ At there, can see in Perl 5.9.5 (devel, not stable) has named captures, coming in Perl 5.10 Does
    Message 1 of 14 , Nov 1, 2007
      On Nov 1, 2007 2:05 PM, Sheri <silvermoonwoman@...> wrote:
      > --- In ntb-scripts@yahoogroups.com, "Alan C" <acummingsus@...> wrote:
      >
      > > You can buy a new Dell nowadays with Linux on it. (I don't know if
      > > that's a sign of a trend or not).
      >
      > I'm still entrenched in Windows myself, but definitely not attracted
      > to Vista, so you never know. PCRE comes from a Linux environment btw.
      > Also, its my understanding that in some of the latest versions of Perl
      > you can tell it to use PCRE for regex matching! One of the reasons I
      > like PCRE is we get use some of the latest developments in regex/Perl.
      > PCRE has features of Perl 5.10 but the latest ActiveState Perl I can
      > get is still several years old (around 5.8.8).

      I'm a subscriber at next

      http://www.theperlreview.com/

      At there, can see in Perl 5.9.5 (devel, not stable) has named
      captures, coming in Perl 5.10

      Does Notetab have named captures?

      I see it also has at there url the 1st page of the named captures
      article (I'm unaware how much is disclosed in the 1st page)

      (the name tag [ for person to wear ] has (I guess) a named capture on
      it) -- as usual, I need to study more (always behind in my studies)

      --
      Alan.
    • Sheri
      ... lol! NoteTab has had named captures since NoteTab version 5.0. PCRE has had them since PCRE version 6.7 (current version is 7.4) At first the PCRE
      Message 2 of 14 , Nov 1, 2007
        --- In ntb-scripts@yahoogroups.com, "Alan C" <acummingsus@...> wrote:
        >
        >
        > At there, can see in Perl 5.9.5 (devel, not stable) has named
        > captures, coming in Perl 5.10
        >
        > Does Notetab have named captures?
        >
        > I see it also has at there url the 1st page of the named captures
        > article (I'm unaware how much is disclosed in the 1st page) (the
        > name tag [ for person to wear ] has (I guess) a named capture on
        > it) -- as usual, I need to study more (always behind in my
        > studies)
        > --

        lol! NoteTab has had named captures since NoteTab version 5.0. PCRE
        has had them since PCRE version 6.7 (current version is 7.4)

        At first the PCRE conventions for named captures was modeled after
        Python, but then .Net's naming version was added, and now that Perl
        has adopted one, PCRE supports that convention also.

        So for regex patterns in NoteTab, named captures can be specified with
        (?<name>...) or (?'name'...) or (?P<name>...)

        Simple backreferences within the pattern can be specified as \k{name}
        or \k<name> or \k'name' or (?P=name) or \g{name}. You can also use
        names for conditional patterns and subroutines (and they have several
        supported conventions too).

        Backreferences in NoteTab's replacement string are written $<name>

        So, when it comes to named captures, NoteTab and PCRE are ahead of
        Perl's curve so to speak.

        Another of the newer features I use alot is \K. \K resets the (whole)
        match start postion. So "Happy \KBirthday" matched against "Happy
        Birthday" returns "Birthday" as the whole match. Unlike a lookbehind
        assertion, what precedes \K is not required to be a fixed length. Perl
        will have \K in version 5.10.

        Regards,
        Sheri
      • Rob Springer
        Maybe I m going crazy... Is there some sort of persistence to the setting of these modes? Specifically with using the std search/replace box. I m occasionaly
        Message 3 of 14 , Nov 9, 2007
          Maybe I'm going crazy...

          Is there some sort of persistence to the setting of these modes?
          Specifically with using the std search/replace box.
          I'm occasionaly getting some weird behavior that could be due to being
          in the wrong mode, but I can't pin it down.

          It does seem that you can use the "unset" techniques on these options
          to be sure it is in the correct mode.

          Thanks,
          Rob

          --- In ntb-scripts@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
          >
          > --- In ntb-scripts@yahoogroups.com, "Rob Springer" <springro@> wrote:
          > >
          > > Hi,
          > >
          > > PCRE lists it has a "dotall" mode that allows for the . character to
          > > also match any sort of line feed / CRs also.
          > >
          > > Is there a way to turn on this option in NTB5.5??
          > >
          > > Thanks,
          > > Rob
          >
          > Sure, by including (?s) at the start of the pattern. See the "Internal
          > Option Setting" part of the regex help file.
          >
          > Regards,
          > Sheri
          >
        • Sheri
          ... No. However I do think that NoteTab defaults to multiline and (at least for ^$GetDocMatchAll$) to case insensitive.
          Message 4 of 14 , Nov 9, 2007
            --- In ntb-scripts@yahoogroups.com, "Rob Springer" <springro@...> wrote:
            >
            > Maybe I'm going crazy...
            >
            > Is there some sort of persistence to the setting of these modes?
            > Specifically with using the std search/replace box. I'm
            > occasionaly getting some weird behavior that could be due to
            > being in the wrong mode, but I can't pin it down.

            No. However I do think that NoteTab defaults to multiline and (at
            least for ^$GetDocMatchAll$) to case insensitive.

            http://tech.groups.yahoo.com/group/ntb-clips/message/16627

            > It does seem that you can use the "unset" techniques on these
            > options to be sure it is in the correct mode.

            True.

            Regards,
            Sheri
          • Alan C
            ... Does it matter whether or not the word wrap is turned or switched off when using a regex in the search dialog (obviously on the current document(s) ). --
            Message 5 of 14 , Nov 9, 2007
              On Nov 9, 2007 8:44 AM, Sheri <silvermoonwoman@...> wrote:
              > --- In ntb-scripts@yahoogroups.com, "Rob Springer" <springro@...> wrote:
              > >
              > > Maybe I'm going crazy...
              > >
              > > Is there some sort of persistence to the setting of these modes?
              > > Specifically with using the std search/replace box. I'm
              > > occasionaly getting some weird behavior that could be due to
              > > being in the wrong mode, but I can't pin it down.
              >
              > No. However I do think that NoteTab defaults to multiline and (at
              > least for ^$GetDocMatchAll$) to case insensitive.
              >
              > http://tech.groups.yahoo.com/group/ntb-clips/message/16627
              >
              > > It does seem that you can use the "unset" techniques on these
              > > options to be sure it is in the correct mode.
              >
              > True.

              Does it matter whether or not the word wrap is turned or switched off
              when using a regex in the search dialog (obviously on the current
              document(s) ).

              --
              Alan.
            • Sheri
              ... Hi Alan, I don t think word wrap mode has any effect on search results via the dialogs or clip commands (regex or not regex). However, it does matter for
              Message 6 of 14 , Nov 9, 2007
                --- In ntb-scripts@yahoogroups.com, "Alan C" <acummingsus@...> wrote:
                >
                > Does it matter whether or not the word wrap is turned or switched off
                > when using a regex in the search dialog (obviously on the current
                > document(s) ).

                Hi Alan, I don't think word wrap mode has any effect on search results
                via the dialogs or clip commands (regex or not regex). However, it
                does matter for other clip commands like ^!Jump.

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