Answers for "regular expression matches cpp"

C++
0

cpp regex match

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
Posted by: Guest on January-11-2021

Code answers related to "regular expression matches cpp"

Browse Popular Code Answers by Language