my @matching_words = grep(/$your_regular_expression/, @lines);