String Search - how to find the "most" accurate string?
One way to do so is as follows:


Sort the company names from longest to shortest.
For each company name $c$:

a. Find all the substrings of the input string that equal $c$ and don't use any characters from a previous occurrence of a company name.

b. If some substring exists, add $c$ to the solution.


This strategy works if you're trying to solve the problem you've stated. But if you want a more robust solution, you should look into using natural language processing tools like Python's NLTK. These tools allow you to take syntax and context into account, and might help you tell the difference between "I ate a big apple", and "I bought shares in Big Apple".