Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-06-02 15:16
Flavor·PCRE (Legacy)

/
^(\+)(?(1))\d{1,3}?[- ]?\d{10}$|^([^0])(?(1))\d{9}?$|^([0])(?(1))\d{10}?$
/
Open regex in editor

Description

This is not supported in Javascript! Works well for php, python. Examples: +91-8800119719, 08800119719, 8800119719, +918800119719 etc.

Submitted by Prateek Jain