perl -wlne 'while(s/(\w+?)\1+//){print$`if$`;@L=split"(?=$1)",$&;printf"%s repeated %i times\n",$1,$#L+1}'