title: Converting C++ Boost Regexes to Python re regexes
body: <p>The aim is to convert these regexes in <code>C++</code> <code>boost</code> to <code>Python</code> <code>re</code> regexes:</p>
  
  <pre><code>  typedef boost::u32regex tRegex;
  
    tRegex emptyre = boost::make_u32regex("^$");
    tRegex commentre = boost::make_u32regex("^;.*$");
    tRegex versionre = boost::make_u32regex("^@\\$Date: (.*) \\$$");
    tRegex includere = boost::make_u32regex("^&lt;(\\S+)$");
    tRegex rungroupre = boost::make_u32regex("^&gt;(\\d+)$");
    tRegex readreppre = boost::make_u32regex("^&gt;(\\S+)$");
    tRegex tokre = boost::make_u32regex("^:(.*)$");
    tRegex groupstartre = boost::make_u32regex("^#(\\d+)$");
    tRegex groupendre = boost::make_u32regex("^#$");
    tRegex rulere = boost::make_u32regex("^([!-+^])([^\\t]+)\\t+([^\\t]*)$");
  </code></pre>
  
  <p>I could rewrite these regexes one by one but there're quite a lot more that the example above, so my question is with regards to </p>
  
  <ul>
  <li><strong>how to convert C++ boost regexest to Python</strong> and </li>
  <li><strong>what is the difference between boost regexes and python re regexes?</strong></li>
  </ul>
  
  <p><strong>Is the C++ <code>boost::u32regex</code> the same as <code>re</code> regexes in python?</strong> If not, what is the difference? (Links to the docs would be much appreciated =) ) For instance:</p>
  
  <ul>
  <li>in boost, there's <code>boost::u32regex_match</code>, is that the same as 
  <code>re.match</code>?</li>
  <li>in boost, there's <code>boost::u32regex_search</code>, how is it different to <code>re.search</code></li>
  <li>there's also <code>boost::format_perl</code> and <code>boost::match_default</code> and <code>boost::smatch</code>, what are their equivalence in <code>python</code> <code>re</code>?</li>
  </ul>