in reply to Byte repetition check
(just don't decode your strings, and you'll have bytes... pretty much)$ perl -0777 -nE ' my $count = 0; $count += length $2 while /(.)(\1+)/g; say $count; ' <<< "1112223333" 7 $ perldoc perlop | perl -0777 -nE ' my $count = 0; $count += length $2 while /(.)(\1+)/g; say $count; ' 22788
|
|---|