On 7/24/2013 5:26 PM, flo.gehrke wrote:
> --- In email@example.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
>> ^!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.
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.