Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-08-20 21:21
Flavor·PCRE (Legacy)

/
^\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})$
/
Open regex in editor

Description

U.S. Phone number with optional area code.

Submitted by anonymous