Regular Expressions 101

Library entries

US Phone Number Format Check

Vote

1

Regular Expression
pcre

/
^(((1)?(\d{3})?(\d{7})$)|((1-)?(\d{3}?-)(\d{3})-(\d{4}))|(((1)?\((\d{3})\))?(\d{3})-?(\d{4})))$
/
A

Description

Loading markdown...
Submitted by anonymous - 6 years ago