Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)
/
gm

Description

Starts with either: +31, +31(0), (+31)(0), 0031, 0 followed by 10 digits, '-' or space

First part:
+311234567890 +31(0)1234567890 (+31)(0)1234567890 00311234567890 01234567890

Second part: 0031123456789- 003112345 789- 0031-23456780-

Submitted by anonymous - 6 years ago