title: strip a verbose python regex
body: <p>I have a verbose python regex string  (with lots of whitespace and comments) that I'd like to convert to "normal" style (for export to javascript). In particular, I need this to be quite reliable. If there's any demonstrably correct way to do this, it's what I want. For example, a naive implementation would destroy a regex like <code>r' \# # A literal hash character'</code>, which is not OK.</p>
  
  <p>The best way to do this would be to coerce the python re module to give me back a non-verbose representation of my regex, but I don't see a way to do that.</p>