Answers for "Write a regular expression to validate phone number in XXX-XXX-XXXX format?"

1

Write a regular expression to validate phone number in XXX-XXX-XXXX format?

/^(?:\(\d{3}\)|\d{3}-)\d{3}-\d{4}$/
Posted by: Guest on April-11-2020

Code answers related to "Write a regular expression to validate phone number in XXX-XXX-XXXX format?"

Code answers related to "Javascript"

Browse Popular Code Answers by Language