title: Python/Regex - How to extract date from filename using regular expression?
body: <p>I need to use python to extract the date from filenames. The date is in the following format:</p>
  
  <pre><code>month-day-year.somefileextension
  </code></pre>
  
  <p>Examples:</p>
  
  <pre><code>10-12-2011.zip
  somedatabase-10-04-2011.sql.tar.gz
  </code></pre>
  
  <p>The best way to extract this would be using regular expressions?</p>
  
  <p>I have some code:</p>
  
  <pre><code>import re
  m = re.search('(?&lt;=-)\w+', 'derer-10-12-2001.zip')
  print m.group(0)
  </code></pre>
  
  <p>The code will print '10'. Some clue on how to print the date?</p>
  
  <p>Best Regards,</p>