title: Python Regex (Search Multiple values in one string)
body: <p>In python regex how would I match against a large string of text and flag if any one of the regex values are matched... I have tried this with "|"  or statements and i have tried making a regex list.. neither worked for me.. here is an example of what I am trying to do with the or.. </p>
  
  <p>I think my "or" gets commented out</p>
  
  <pre><code>patterns=re.compile(r'[\btext String1\b] | [\bText String2\b]')   
  
  if(patterns.search(MyTextFile)):
       print ("YAY one of your text patterns is in this file")
  </code></pre>
  
  <p>The above code always says it matches regardless if the string appears and if I change it around a bit I get matches on the first regex but never checks the second.... I believe this is because the  "Raw"  is commenting out my or statement but how would I get around this??</p>
  
  <p>I also tried to get around this by taking out the "Raw" statement and putting double slashes on my \b  for escaping but that didn't work either  :(  </p>
  
  <pre><code>patterns=re.compile(\\btext String1\\b | \\bText String2\\b)   
  
  if(patterns.search(MyTextFile)):
       print ("YAY one of your text patterns is in this file")
  </code></pre>
  
  <p>I then tried to do 2 separate raw statements with the or and the interpreter complains about unsupported str opperands... </p>
  
  <pre><code>patterns=re.compile(r'\btext String1\b' | r'\bText String2\b')   
  
  if(patterns.search(MyTextFile)):
       print ("YAY one of your text patterns is in this file")
  </code></pre>