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

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

Expand Messages
  • Don
    Very much so. Easy to redo the date as suggested since I make this with a regex from raw data. Never even occurred to me to format that way. It is possible
    Message 1 of 9 , Jul 21 11:42 AM
    • 0 Attachment
      Very much so. Easy to redo the date as suggested since I make this with
      a regex from raw data. Never even occurred to me to format that way.

      It is possible to have a "single" appearance of the initial code so I'll
      have a look at that.

      On 7/21/2013 12:41 PM, joy8388608 wrote:
      > Here is some code to help/get you started...
      >
    • flo.gehrke
      ... This clip inserts the frequency at the beginning of each line. Also single occurrences are marked up: ^!Jump Doc_Start ... ^!Find ^( w+).+( R 1.+)* RS
      Message 2 of 9 , Jul 22 5:35 AM
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, Don <don@...> wrote:
        >
        > It is possible to have a "single" appearance of the initial code
        > so I'll have a look at that.

        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

        Regards,
        Flo
      • flo.gehrke
        ... 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
        Message 3 of 9 , Jul 24 2:26 PM
        • 0 Attachment
          --- 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
        • 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 4 of 9 , Jul 24 2:34 PM
          • 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 5 of 9 , Jul 24 6:28 PM
            • 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.