title: Python regex check if string contains any of words
body: <p>I want to search a string and see if it contains any of the following words: <code>AB|AG|AS|Ltd|KB|University</code></p>
  
  <p>I have this working in javascript:</p>
  
  <pre><code>var str = 'Hello test AB';
  var forbiddenwords= new RegExp("AB|AG|AS|Ltd|KB|University", "g");
  
  var matchForbidden = str.match(forbiddenwords);
  
  if (matchForbidden !== null) {
     console.log("Contains the word");
  } else {
     console.log("Does not contain the word");
  }
  </code></pre>
  
  <p>How could I make the above work in python?</p>