$_ = "123patternABCpatternJJEK"; while ($_ =~ /(pattern)/gim) { push @array, $_; } [download]
In reply to Store multiple match single line by yoda54