in reply to "Pattern Matching", not using regex
It's not clear from your question, but do you even need to use pattern matching at all? If what you're trying to match (the lines from the first file) are fixed strings, a simple eq will do the job.
It may be obvious and not apply to what you're doing, but I wanted to point it out, because it's very common that people over-use pattern matching when a simple string compare will suffice.
|
|---|