Can someone help me out code using the below to get the equivalent program as beneath:
boost::match_results<std::string::const_iterator> what;
boost::regex_match(input, what, e, boost::match_default | boost::match_partial))
#include <iostream>
#include <string>
#include <boost/regex.hpp>
int main()
{
std::string s = "who, lives:in-a, pineapple under the sea?";
boost::regex re(",|:|-|\\s+");
boost::sregex_token_iterator p(s.begin(), s.end(), re, -1);
boost::sregex_token_iterator end;
while( p != end)
std::cout << *p++ << std::endl;
}
Basically I am trying to use a result_match iterator
rather than the std::string::const_iterator rather than boost::sregex_token_iterator
thanks much.