in reply to Re^2: Longest possible run of a single character
in thread Longest possible run of a single character
EXTREME TIMTOWTDI the other way around :)
#!/usr/bin/perl -l # http://perlmonks.org/?node_id=551038 use strict; use warnings; $_ = 'ABDBACCBBBCBDDBCDCBCCDBABCBABBBBBADACDABACC'; print "longest run: ", length eval "'".s/(.)\1*\K/'|'/gr."'";
|
---|