title: How to match exact "multiple" strings in Python
body: <p>I've got a list of exact patterns that I want to search in a given string. Currently I've got a real bad solution for such a problem.</p>
  
  <pre><code>pat1 = re.compile('foo.tralingString')
  mat1 = pat1.match(mystring)
  
  pat2 = re.compile('bar.trailingString')
  mat2 = pat2.match(mystring)
  
  if mat1 or mat2:
      # Do whatever
  
  pat = re.compile('[foo|bar].tralingString')
  match = pat.match(mystring) # Doesn't work
  </code></pre>
  
  <p>The only condition is that I've got a list of strings which are to be matched exactly. Whats the best possible solution in Python.</p>
  
  <p>EDIT: The search patterns have some trailing patterns common.</p>