perl -nle 'printf(defined $3 ? "%s\n" : "%s repeated %s time(s)\n", $1.$3, length($2)/length($1.$3)+1) while/(?:(\w+?)(\1+))|(?:(\w+?)(?!\3))/g'