title: Python regex match OR operator
body: <p>I'm trying to match time formats in AM or PM.</p>
  
  <pre><code>i.e. 02:40PM
       12:29AM 
  </code></pre>
  
  <p>I'm using the following regex</p>
  
  <pre><code>timePattern = re.compile('\d{2}:\d{2}(AM|PM)')
  </code></pre>
  
  <p>but it keeps returning only <code>AM</code> <code>PM</code> string without the numbers. What's going wrong?</p>