I’ve seen this previous post, about matching against multiple regexes
How can I match against multiple regexes in Perl?
I’m looking for the fastest way to match all the values contained in an array against a very big file (500 MB).
The patterns are read from the stdin and may contain special characters that must be used in the regex (anchors, character classes etc). The match must happen when all the patterns are contained in the current row.
Currently I’m using a nested for cycle but I’m not very satisfied with the speed….
Thanks for your suggestions.
Did you try using grep?