29 Aug
2006
29 Aug
'06
1:08 p.m.
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; }