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

Re: [Clip] Obscure regex features (was: best way to substitute a list of items)

Expand Messages
  • Alec Burgess
    Sheri (silvermoonwoman@comcast.net) wrote (in part) (on 2009-05-01 at ... Flo and Sheri - you are both scary good :-) Current documentation for Notetab
    Message 1 of 9 , May 2, 2009
    • 0 Attachment
      Sheri (silvermoonwoman@...) wrote (in part) (on 2009-05-01 at
      23:40):
      > Thanks Flo, you taught me some things :) For one, I thought it was
      > necessary to capture the empty string or the token in the replacement
      > string would be not work properly. For another I didn't even know
      > about ?|

      Flo and Sheri - you are both scary good :-)
      Current documentation for Notetab regular expressions: Regex.chm (mine
      is dated Friday, March 27, 2009, 05:08:00) includes:

      (?| - DUPLICATE SUBPATTERN NUMBERS it says introduced with Perl 5.10)
      but does not include any mention I could find of
      (?N option - allow duplicate names

      from the Regex.chm we have:
      > INTERNAL OPTION SETTING
      >
      > The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
      > PCRE_EXTENDED options (which are Perl-compatible) can be changed from
      > within the pattern by a sequence of Perl option letters enclosed
      > between "(?" and ")". The option letters are
      >
      > i for PCRE_CASELESS
      > m for PCRE_MULTILINE
      > s for PCRE_DOTALL
      > x for PCRE_EXTENDED

      In http://www.pcre.org/pcre.txt we have:
      > OPTION SETTING
      >
      > (?i) caseless
      > (?J) allow duplicate names
      > (?m) multiline
      > (?s) single line (dotall)
      > (?U) default ungreedy (lazy)
      > (?x) extended (ignore white space)
      > (?-...) unset option(s)
      I'm confused .... ?
      Unfortunately neither (?| nor (?J appears to be supported in current
      RegexBuddy - I think its still a couple of versions behind in its PCRE
      support / (emulation?)

      --
      Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)




      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.