in reply to Repeated character in regex
while (<DATA>) { chomp; my $s = $_; @matches = $s =~ /(\w)\1/g; if (scalar @matches == 3) { print "$s: three two-letter repeats."; } } __DATA__ hullaballoo chubbalicious [download]