Answers for "regex verify if phone number"

13

js regex validate phone number

My regex of choice is:

/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im
Valid formats:

(123) 456-7890
(123)456-7890
123-456-7890
123.456.7890
1234567890
+31636363634
075-63546725
Posted by: Guest on February-07-2020
10

phone number regex

^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$
Posted by: Guest on November-28-2019

Browse Popular Code Answers by Language