Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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);
 
PREVIOUS NEXT
Tagged: #regex #phone #number
ADD COMMENT
Topic
Name
1+3 =