title: C++ boost::regex_match gives all NULLs results
body: <p>I am facing a weird problem which is boost::regex_match gives all NULLs results.</p>
  
  <p>Sorry for the bad problem description. Let me copy and paste the code below.</p>
  
  <p>I think the boost lib version should be Boost 1-47-0. GCC 4.3.2 on Linux.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;boost/regex.hpp&gt;
  
  using namespace std;
  
  int main()
  {
      string aFreeText = "26JAN07";
      boost::regex expression("([0-9]{2}[A-Z]{3}[0-9]{2})");
      boost::smatch results;
  
      if(boost::regex_match(aFreeText, results, expression))
      {
          for(int index=0; index&lt;results.size(); index++)
              DEBUG("YI JI results[" &lt;&lt; index &lt;&lt; "].str(): " &lt;&lt; results[index].str());
      }
  
      return 0;
  }
  </code></pre>
  
  <p>However, in the log, the display is very weird.</p>
  
  <p><img src="https://i.stack.imgur.com/o0djW.jpg" alt="enter image description here"></p>
  
  <p>Can anyone kindly help me with this problem? Your kind help will be greatly appreciated.</p>
  
  <p>If the provided information is not enough, please feel free to leave your comment and I will add them later.</p>