Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^((0?|90?|\+90?)\s?(322|424|236|416|446|482|272|442|324|472|222|252|382|342|436|358|454|384|312|456|388|242|438|452|478|326|328|466|476|464|256|246|264|266|216|362|378|212|484|488|232|368|458|344|346|228|370|414|426|338|486|434|474|282|374|366|356|248|352|462|224|318|428|286|288|276|376|386|432|364|348|226|258|262|354|412|332|372|380|274||284|422))\s?(\d{3})\s?(\d{2})\s?(\d{2})$
/
g

Description

It matches all phone numbers in Turkey starting with country and area code.

+902121111111 +90 2121111111 +90 212 1111111 +90 212 111 1111 +90 212 111 11 11 902121111111 02121111111 2121111111 212 111 1111 212 111 11 11 0212 111 11 11 0 212 1111111 0 212 111 11 11

Submitted by Erman Seneren - 2 years ago