in reply to Re: Efficient run determination.
in thread Efficient run determination.
use strict; use Data::Dumper; my $string =' aaaa bbbbccccccccbbbb aaaabbbbbcdddddddddddddddd +dddd'; my @bah; while ($string =~ /((.)\2*)/g) { push (@bah, [$2,$-[1],$+[1] - $-[1]]); } print Dumper(\@bah);
Update Changed the \2+ to \2* or it would have failed when there was a series one character long.
-enlil
|
|---|