while () { push @list, /AAA.\d/g; # parens not needed in regex here }