title: RegExp in Python
body: <p>This is an example that searches PDF files in the current directory.</p>
  
  <pre><code>import os, os.path
  import re
  
  def print_pdf (arg, dir, files):
   for file in files:
    path = os.path.join(dir, file)
    path = os.path.normcase(path)
    if re.search(r".*\.pdf", path):
     print path
  
  os.path.walk('.', print_pdf, 0)
  </code></pre>
  
  <p>Could anyone explain what <code>r".*\.pdf"</code> means here?</p>
  
  <p>Why <code>".*\"</code>?</p>
  
  <p>Thanks!</p>