|
Boost Users : |
From: david v (danova_fr_at_[hidden])
Date: 2006-08-29 09:08:04
So to sum-up.
If the regex i'm looking for is "testing" and the string to search the regex
for is "tastung" (obviously this is a short example but i'm dealing with
more complex regular expressions.
how can i get the number of mismatches. Basically the output of the program
would tell me:
>2 mismatches found in string "tastung" at position 2 (a) and 5(u).
I have tried the iterator above but does not seem to do what i want???
std::string::const_iterator start = in.begin();
std::string::const_iterator end = in.end();
boost::sregex_token_iterator i(start, end, *regex, -1), j;
while(i != j)
{
cout << *i << endl;
}
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