&lt; "Text:        \"" &lt;&lt; text &lt;&lt; "\"\n";
   if(boost::regex_match(text, what, e, boost::match_extra))
   {
      unsigned i, j;
      std::cout &lt;&lt; "** Match found **\n   Sub-Expressions:\n";
      for(i = 0; i &lt; what.size(); ++i)
         std::cout &lt;&lt; "      $" &lt;&lt; i &lt;&lt; " = \"" &lt;&lt; what[i] &lt;&lt; "\"\n";
      std::cout &lt;&lt; "   Captures:\n";
      for(i = 0; i &lt; what.size(); ++i)
      {
         std::cout &lt;&lt; "      $" &lt;&lt; i &lt;&lt; " = {";
 