title: C++ Regex to match words without punctuation
body: <p>I searched, couldn't find anything. In the interest of not wasting any more of my time on the chance that the answer is obvious to someone else, I'm asking here. Only site that has been useful so far is this one: <a href="http://softwareramblings.com/2008/07/regular-expressions-in-c.html" rel="nofollow">http://softwareramblings.com/2008/07/regular-expressions-in-c.html</a> but the samples are far too simplistic. I'm using Visual studio 2010.</p>
  
  <pre><code>#include &lt;regex&gt;
  
  [...]
  
  string seq = "Some words. And... some punctuation.";
  regex rgx("\w");
  
  smatch result;
  regex_search(seq, result, rgx);
  
  for(size_t i=0; i&lt;result.size(); ++i){
      cout &lt;&lt; result[i] &lt;&lt; endl;
  }
  </code></pre>
  
  <p>Expected output would be:</p>
  
  <p>Some<br>
   words<br>
   And<br>
   some<br>
   punctuation  </p>
  
  <p>Thanks.</p>