in reply to Re: substrings that consist of repeating characters
in thread substrings that consist of repeating characters

At risk of upsetting likbez:

use strict; use warnings; my $string = "AAAATTTAGTTCTTAAGGCTGACATCACGTCAGCGTTACCCCCCAAGATTGGGGAC +TTT"; my $len = 0; my $best = ''; $best = $1, $len = length $1 while $string =~ /((.)\2{$len,})/g; print "best: $best ($len)\n"

Prints:

best: CCCCCC (6)
Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond