title: Algorithm to find multiple string matches
body: <p>I'm looking for suggestions for an efficient algorithm for finding all matches in a large body of text. Terms to search for will be contained in a list and can have 1000+ possibilities. The search terms may be 1 or more words.</p>
  
  <p>Obviously I could make multiple passes through the text comparing against each search term. Not too efficient.</p>
  
  <p>I've thought about ordering the search terms and combining common sub-segments. That way I could eliminate large numbers of terms quickly. Language is C++ and I can use boost.</p>
  
  <p>An example of search terms could be a list of Fortune 500 company names.</p>
  
  <p>Ideas?</p>