Community Patterns

Community Library Entry

2

Regular Expression
Created·2021-02-15 10:23
Flavor·PCRE (Legacy)

/
^(00989|\+989|09)(\d{9})$
/
gm
Open regex in editor

Description

Persian Mobile Number Matching

Iran's international phone code is +98 and sometimes people use 0098. All mobile numbers starts with 9 after the code.

So this pattern matches exactly a sequence of characters which starts with one of +989, 0098 or 09 prefixes and total count of characters after these prefixes is exact 9.

Submitted by anonymous