Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(\+?\d{0,2})?\s?[\D]?\(?(\d{3})\)?[\D]?(\d{3})[\D]?(\d{4})$
/
gm

Description

Universal Phone Regular Expression

Submitted by Priy Ranjan Prakash - 2 years ago