in reply to Backreference regex help

Hi there,

It would be most helpful if you gave examples of input that doesn't work. Hard to know what you're seeing otherwise. That said, the match you're performing actually tests for strings that occur 6 or more times. The initial group ([A-Z]) counts as one character, and then five or more {5,}, for a total of six.

Try:

if (@match = $sequ{$k} =~ m/([A-Z])\1{4,}/g)