I am using boost::regex
to match (better to say boost::regex_search
) a text vs a regular expression.
This one doesn't match and my regex is really huge.
Do you know if in the library is there any function telling me which part of the regex failed to match?
I am using LINUX/gcc
std::string text; // whatever
boost::regex rgx( "(\\w+) (\\d+) (\\s+)" );
boost::smatch m;
if( !boost::regex_search( text, m, rgx ) ){
// how to know where (\\w+) or (\\d+) or (\\s+) failed?
}