title: Python regular expression style
body: <p>Is there a Pythonic 'standard' for how regular expressions should be used?</p>
  
  <p>What I typically do is perform a bunch of <em>re.compile</em> statements at the top of my module and store the objects in global variables... then later on use them within my functions and classes.</p>
  
  <p>I could define the regexs within the functions I would be using them, but then they would be recompiled every time.</p>
  
  <p>Or, I could forgo re.compile completely, but if I am using the same regex many times it seems like recompiling would incur unnecessary overhead.</p>