title: How to express logical or in regular expression in python?
body: <p>How to express logical or in regular expression in python?
  Why <code>re.search("o"|"a","hallo")</code> and <code>re.search(("o"|"a"),"hallo")</code> is wrong?</p>
  
  <pre><code>&gt;&gt;&gt; if(re.search("a","hallo")):print("ok")
  ...
  ok
  &gt;&gt;&gt; if(re.search("o","hallo")):print("ok")
  ...
  ok
  &gt;&gt;&gt; if(re.search("o"|"a","hallo")):print("ok")
  ...
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: unsupported operand type(s) for |: 'str' and 'str'
  &gt;&gt;&gt; if(re.search(("o"|"a"),"hallo")):print("ok")
  ...
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: unsupported operand type(s) for |: 'str' and 'str'
  </code></pre>