extract desire keyword/text pair

I am looking for extract keyword pair from text files.

They might not be next to each other and do not have same pattern for each occurrence.
And I would not think regex will works because there is no certain pattern.

You can imagine the pair-text are software/OS(key) with its version/license code(value).
At most time they don’t share same format nor share specific format.

software name will come first then version will come next/later.
Example,

AAA
V1.22

AAA/aaa/home/V1.22

AAA version V1.22

AAA(V1.22)

AAA is using V1.22 in OS.


it might worth to mention that, I have a file that contains all the key.

I have did some searching and thinking

1. regex and capture line/2 lines with next line, that contains key entire lines. then further process to get only the two meaningful word (need more thinking)

2. use NLP to create knowledge base and use CNN/Deep Learning to create knowledge base and start getting results,is it going to take at least 2 months ? I am looking for solution that can be achieved less than that.

3. Enforcement Learning where i can define the faulty, keep improving and use more and more data

4. AutoML (dont think it fits, as i understand it is concerning automation-something that it knows and doesnt do on uncertainty)

5. Is there something out there that is able to extract all the paired-text, and return results and i can mark the correct one and pump the processed data for its knowledge?

Anyone can give some suggestion on how to achieve it?
the aim is to obtain results in 3 columns(file name, key, value) csv.
Any kinds of inputs would be great. Thanks!