Answers for "regex for phone number c++"

C++
1

regex for phone number c++

std::regex r("\\(\\d{3}\\) \\d{3}-\\d{4}"); // e.g. "(012) 345-6789" 
auto isValidPhoneNumber = std::regex_match(phone_num_str, r);
Posted by: Guest on September-16-2020

Browse Popular Code Answers by Language