title: Commenting Regular expressions in python
body: <p><a href="https://stackoverflow.com/a/708287/1707076">This answer</a> to a question regarding the maintainability of regular expressions mentions the ability of .NET users to implement comments in their regular expressions (I am particularly interested in the second example)</p>
  
  <p>Is there an easy native way to reproduce this in python, preferably without having to install a third party library or writing my own comment-strip algorithm?</p>
  
  <p>what I currently do is similar to the first example in that answer, I concatenate the regular expression in multiple lines and comment each line, like in the following example:</p>
  
  <pre><code>    regexString  =  '(?:' # Non-capturing group matching the beginning of a comment
      regexString +=      '/\*\*'
      regexString +=  ')'
  </code></pre>