Since you're looking for exact matches, I believe that using the
index function might be more efficient than regex matching. In general,
index is faster than regexes for exact matches, but, in that specific case, building a large pattern with all the search strings, as shown by
tybalt89, might actually end up to be faster.
You might also consider to store fh2 into a large string (joined by an appropriate separator), this is also likely to be faster than looping over the content of fh2.