Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

/
^[(]\d{3}[)][-]\d{3}[-]\d{4}$
/

Description

Verifies a phone number

Submitted by anonymous - 11 years ago