Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^\+[1-9]\d{6,13}$
/
gm

Description

  • Number must start from + and end with a number.
  • Number can be 7 to 15 digit long including + sign in length.
  • Starting with + and leading 0 is not allowed.
Submitted by anonymous - 6 years ago