Trying boost::regex_match and got a strange behaviour.
boost::cmatch what;
std::string fn_re_str = R"(\.sig\|\|([a-zA-Z0-9$]+)\()";
boost::regex fn_re(fn_re_str);
if (boost::regex_match("{var d=a[c];if(d.sig||d.s){var e=d.sig||qt(d.", what, fn_re)) {
std::cout << what[1] << std::endl;
} else {
std::cerr << "not found" << std::endl;
}
qt is expected to be found.
Here http://ift.tt/1Kai95K it is found.
Why boost::regex_match can't find it? Do I miss something?
Aucun commentaire:
Enregistrer un commentaire