Phone Number Regex

0
I am trying to create a regular expression for a phone number but cannot get it to work. I thought: [.(][0-9]{3}[.)] ?[0-9]{3}[.-][0-9]{4} would work but obviously it does not. Can anyone help me figure out how to fix my regex? Thanks!
asked
2 answers
0

Have a look at a-comprehensive-regex-for-phone-number-validation, depending on the numbers you need to validate they have got some nice examples.

answered
-1

isMatch($PhoneNumber, '^\+?1?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$')

answered