in reply to Regex matching on grid alignment

DB<130> $a='ABCBBBCBADBCCACDDDAC' => "ABCBBBCBADBCCACDDDAC" DB<131> grep { /(.)\1\1/ } unpack '(A5)4', $a => "DDDAC"

edit

unpack pattern shortened

Cheers Rolf

( addicted to the Perl Programming Language)

update

IMHO its also possible to include the same principle into one regex (matching groups of 5 characters and investigating each match with embedded Perl) but I doubt it's more readable.