Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(\()?\d{3}(\))?(-|\s)?[2-9]{1}\d{2}(-|\s)\d{4}$
/

Description

(789) 456-1230

Submitted by anonymous - 4 years ago