Regular Expressions 101

Community Patterns

1...34567...902

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^(?:\+1)?\(?([2-9]{0,1}[0-9]{2})\)?[. -]?([0-9]{3})[.-]?([0-9]{4})$
/
mg

Description

Basic Phone Number Matching

Submitted by Anthony Cooper - 4 years ago