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

[Clip] Re: help with a little project ...

Expand Messages
  • flo.gehrke
    ... No, sorry -- it s not the size of the whole list. It pertains to the size of the groups (i.e. duplicate 12-character-strings at start of line) that are
    Message 1 of 9 , Jul 24, 2013
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
      >
      > Joy informed me that the RegEx in this clip will fail in case the
      > list has got 333 or more lines.

      No, sorry -- it's not the size of the whole list. It pertains to the size of the groups (i.e. duplicate 12-character-strings at start of line) that are matched with back reference...

      Flo
    • Don
      ... Truly fascinating. My file will often have thousands of lines actually ... for a long time.
      Message 2 of 9 , Jul 24, 2013
      • 0 Attachment
        On 7/24/2013 5:26 PM, flo.gehrke wrote:
        > --- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
        >>
        >> This clip inserts the frequency at the beginning of each line. Also single occurrences are marked up:
        >>
        >> ^!Jump Doc_Start
        >> :Loop
        >> ^!Find "^(\w+).+(\R\1.+)*" RS
        >> ^!IfError End
        >> ^!Set %Freq%=^$StrCount("^\d+";"^$GetSelection$";R)$
        >> ^!Replace "^" >> "^%Freq%:\x20" HRAS
        >> ^!Goto Loop
        >
        > Joy informed me that the RegEx in this clip will fail in case the list has got 333 or more lines.
        >
        > Sorry, I didn't expect Don's list to be that long.
        >
        > For me, it works when using a Possessive Quantifier: '^(\w+).+(\R\1.+)*+' or '^(\w+).+(\R\1.++)*'.
        >
        > Probably, that problem is caused by a PCRE Error Recursion Limit. For more details, please see what I posted to the Clip Group on 6/20/2012 with message #22824.
        >
        > Regards,
        > Flo

        Truly fascinating. My file will often have thousands of lines actually
        :-) so good you knew the solution. I would have been scratching my head
        for a long time.
      Your message has been successfully submitted and would be delivered to recipients shortly.