Regular Expressions 101

Community Patterns

US phone, any standard format

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 - a year ago