Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^([[+91]{2,3})?([7-9][0-9]{9})$
/
gm

Description

this regex can accept only Indian mobile number that satisfy following +919876543212 919876543212 9876543212

this regex also test that number must be start with 9 or 8 or 7

Submitted by anonymous - 5 years ago