title: Python - Backreferencing a Named Group
body: <p>I am having trouble understanding how to use a named backreference in python. I want to findall referenced of the months January-March and their abbreviated form (e.g. January, Jan., February, Feb., etc.)</p>
  
  <pre><code>str = 'Bob Martin brought a car on January 20, 1962. On Feb. the 23rd, Bob sold his car. The 21st of March will be fun.'
  
  re.findall('''
         (?P&lt;Month&gt; (Jan(uary|\.)) | (Feb(ruary|\.)) | (Mar(ch|\.))) # Months
       | (?P=Month)\sthe\s\d{2}(rd|st)
       | [Tt]he\s\d{2}(rd|st)\sof(?P=Month)
  '''
  str, re.X")
  </code></pre>
  
  <p><strong><em>Should match:</em></strong></p>
  
  <p>Janurary</p>
  
  <p>Feb. the 23rd</p>
  
  <p>The 21st of March</p>