📅  最后修改于: 2022-03-11 14:44:44.995000             🧑  作者: Mango
std::regex re("Get|GetValue");
std::cmatch m;
std::regex_search("GetValue", m, re); // returns true, and m[0] contains "Get"
std::regex_match ("GetValue", m, re); // returns true, and m[0] contains "GetValue"
std::regex_search("GetValues", m, re); // returns true, and m[0] contains "Get"
std::regex_match ("GetValues", m, re); // returns false