Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(?:\(\d{3}\)*\s\d{3}-\d{4})|(?:\d{3}(?:-|\s*)\d{3}-\d{4})|(?:\d{10})
/
gm

Description

Matches any standard, 10-digit US phone number formats

Submitted by Atkin - 2 years ago