There's more than one way to do things | |
PerlMonks |
Re: Backreference regex helpby Loops (Curate) |
on Nov 01, 2014 at 06:56 UTC ( [id://1105781]=note: print w/replies, xml ) | Need 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)
In Section
Seekers of Perl Wisdom
|
|