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 https://regex101.com/r/iR9rW5/1 it is found.
Why boost::regex_match can't find it? Do I miss something?