Regular Expressions 101

Community Patterns

123...6

Phone number

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^[+]*[0-9\s]{1,4}[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\.\/0-9]*$
/
gm

Description

Improvement of the Phone Number regex pattern created by 'elishas@syncode.io'

Submitted by anonymous - 2 years ago