Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^[0]{1}[0-9]{9,10}$
/
g

Description

Pattern means:

  • Phone must start with 0
  • Length of Phone must be greater than or equal to 10 - 11 numbers
  • Space or Special characters doesn't allow
  • Character doesn't allow
Submitted by anonymous - 4 years ago