Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^(?:\+1)?\(?(\d{3})\)?[\s\.-]?(\d{3})[\.-]?(\d{4})$
/
gm

Description

Phone Number RegEx

Submitted by Anthony Cooper - 3 years ago