grep !/$re/, @array; # use // round $re to treat as a pattern match grep $_ !~ $re, @array; # use a negating match