how to find all occurrences in REGEX with

Posted by Vincenzo on Stack Overflow See other posts from Stack Overflow or by Vincenzo
Published on 2010-05-17T10:46:50Z Indexed on 2010/05/17 10:50 UTC
Read the original article Hit count: 248

Filed under:
|

My code is:

#include <boost/regex.hpp>
boost::cmatch matches;
boost::regex_match("alpha beta", matches, boost::regex("([a-z])+"));
cout << "found: " matches.size() << endl;

And it shows found: 2 which means that only ONE occurrence is found… How to instruct it to find THREE occurrences? Thanks!

© Stack Overflow or respective owner

Related posts about boost

Related posts about facebook