
I have upgraded my boost to 1_45 (it was 1_36) and since then I have an error on boost::regex_search
What error? Compiler?
here is the code
std::string regexp = "\\^:\\([^;^]*\\);\\([^;^]*\\);\\([^^]*\\)\\^:"; boost::regex expression( regexp.c_str() , boost::regex::basic|boost::regex::icase );
std::string::const_iterator it_prev = str.begin(); std::string::const_iterator it_end = str.end(); std::string tmp; while (boost::regex_search(it_prev, what, expression))
OK, *if* std::string iterator happens to be a const char* then this will work, otherwise it won't, suggest you use: boost::smatch what; while (boost::regex_search(str, what, expression)) { //etc My guess is you upgraded compiler at the same time as updating Boost? Basically your old code compiled "by accident"... HTH, John.