Regular Expressions 101

Library entries

Validate US Telephone Numbers

Vote

1

Regular Expression
javascript

/
^1?\s?\(\d{3}\)\s?\d{3}\s?-?\d{4}$|^(?:1\s)?\d{3}(\s|-)?\d{3}\1\d{4}$
/

Description

Loading markdown...
Submitted by Davide Vozzi - 6 years ago