in reply to Split a string based on change of character
my $str= "AAABBCCCC";
push @x, $1 while $str =~ /((.)\2*)/g;
Electric eels were invented at the same time as electricity
Before electricity was invented, electric eels had to stun with gas
Results (325 votes). Check out past polls.