Having a quantifier after capturing parentheses is almost always an error.
Maybe you want to directly populate your list?
my @matches = ($string =~ /([A-Z]{3})/g;
but that approach will not work if your input data contains non-alphabetical chars, like:
AAA..BBB
If you want a match to start at a specific position, see perlre on \G.
In reply to Re: Perl Regex Repeating Patterns
by Corion
in thread Perl Regex Repeating Patterns
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |