Boost logo

Boost Users :

From: Roman Neuhauser (neuhauser_at_[hidden])
Date: 2006-08-29 09:12:08


# danova_fr_at_[hidden] / 2006-08-29 09:21:59 +0000:
> How can i use the code below to get the mismatches and their positions with
> boost_check ???
>
> #####Setting the regex
> .....
> re = "test";
> boost::regex *regex = new boost::regex(re,boost::regbase::icase);
> .....
>
> #######Getting the matched
> .......
> std::string::const_iterator start = in.begin();
> std::string::const_iterator end = in.end();
> boost::smatch match;
> while (boost::regex_search(start,end,match,*regex,boost::match_extra))
> {
> cout << match.[0] << endl;
> start = match[0].second;
> }
>
> #############Getting the mismatches ???
> How ???

    You want to subtract the matches from the input?

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net