Skip to content

This repository contains regular expression (regex) patterns for validating phone numbers & postal codes for All countries.

License

Notifications You must be signed in to change notification settings

ariankoochak/regex-patterns-of-all-countries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 

Repository files navigation

🌍 regex patterns of all countries

This repository contains regular expression (regex) patterns for validating phone numbers & postal codes for All countries.

I will be happy if you find a wrong pattern or find a problem. Report it and fix it

Licence

Contents


🇦🇫Afghanistan

Phone Number
  • Pattern: ^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$
Postal Code
  • Pattern: ^\d{4}$

🇦🇽Åland Islands

Phone Number
  • Pattern: ^\+35818[0-9]{5}$
Postal Code
  • Pattern: ^22[0-9]{3}$

🇦🇱Albania

Phone Number
  • Pattern: ^\+355[2-9]\d{7,8}$
Postal Code
  • Pattern: ^\d{4}$

🇩🇿Algeria

Phone Number
  • Pattern: ^(\+?213|0)(5|6|7)\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇦🇩Andorra

Phone Number
  • Pattern: ^(\+376)?[346]\d{5}$
Postal Code
  • Pattern: ^AD\d{3}$

🇦🇴Angola

Phone Number
  • Pattern: ^(\+244)\d{9}$
Postal Code
  • Pattern:

🇦🇮Anguilla

Phone Number
  • Pattern: ^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$
Postal Code
  • Pattern: ^[A][I][-][2][6][4][0]$

🇦🇬Antigua and Barbuda

Phone Number
  • Pattern: ^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$
Postal Code
  • Pattern:

🇦🇷Argentina

Phone Number
  • Pattern: ^\+?549(11|[2368]\d)\d{8}$
Postal Code
  • Pattern: ^\d{4}|[A-Za-z]\d{4}[a-zA-Z]{3}$

🇦🇲Armenia

Phone Number
  • Pattern: ^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$
Postal Code
  • Pattern: ^\d{4}$

🇦🇼Aruba

Phone Number
  • Pattern: ^(\+)?297(56|59|64|73|74|99)\d{5}$
Postal Code
  • Pattern:

🇦🇺Australia

Phone Number
  • Pattern: ^(\+?61|0)4\d{8}$
Postal Code
  • Pattern: ^\d{4}$

🇦🇹Austria

Phone Number
  • Pattern: ^\+43[1-9][0-9]{3,12}$
Postal Code
  • Pattern: ^\d{4}$

🇦🇿Azerbaijan

Phone Number
  • Pattern: ^(\+994|0)(10|5[015]|7[07]|99)\d{7}$
Postal Code
  • Pattern: ^[A][Z]\d{4}$

🇧🇸Bahamas

Phone Number
  • Pattern: ^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$
Postal Code
  • Pattern:

🇧🇭Bahrain

Phone Number
  • Pattern: ^(\+?973)?(3|6)\d{7}$
Postal Code
  • Pattern: ^\d{3,4}$

🇧🇩Bangladesh

Phone Number
  • Pattern: ^(\+?880|0)1[13456789][0-9]{8}$
Postal Code
  • Pattern: ^\d{4}$

🇧🇾Belarus

Phone Number
  • Pattern: ^(\+?375)?(24|25|29|33|44)\d{7}$
Postal Code
  • Pattern: ^\d{6}$

🇧🇪Belgium

Phone Number
  • Pattern: ^(\+?32|0)4\d{8}$
Postal Code
  • Pattern: ^\d{4}$

🇧🇯Benin

Phone Number
  • Pattern: ^(\+229)\d{8}$
Postal Code
  • Pattern:

🇧🇲Bermuda

Phone Number
  • Pattern: ^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))
Postal Code
  • Pattern: ^[A-Za-z]{2}\s([A-Za-z]{2}|\d{2})$

🇧🇹Bhutan

Phone Number
  • Pattern: ^(\+?975|0)?(17|16|77|02)\d{6}$
Postal Code
  • Pattern: ^\d{5}$

🇧🇴Bolivia

Phone Number
  • Pattern: ^(\+?591)?(6|7)\d{7}$
Postal Code
  • Pattern: ^\d{4}$

🇧🇦Bosnia and Herzegovina

Phone Number
  • Pattern: ^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$
Postal Code
  • Pattern: ^\d{5}$

🇧🇼Botswana

Phone Number
  • Pattern: ^(\+?267)?(7[1-8]{1})\d{6}$
Postal Code
  • Pattern:

🇧🇷Brazil

Phone Number
  • Pattern: ^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$
Postal Code
  • Pattern: ^\d{5}-\d{3}$

🇧🇬Bulgaria

Phone Number
  • Pattern: ^(\+?359|0)?8[789]\d{7}$
Postal Code
  • Pattern: ^\d{4}$

🇧🇫Burkina Faso

Phone Number
  • Pattern: ^(\+226|0)[67]\d{7}$
Postal Code
  • Pattern:

🇨🇲Cameroon

Phone Number
  • Pattern: ^(\+?237)6[0-9]{8}$
Postal Code
  • Pattern:

🇨🇦Canada

Phone Number
  • Pattern: ^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$
Postal Code
  • Pattern: ^(?=[^DdFfIiOoQqUu\d\s])[A-Za-z]\d(?=[^DdFfIiOoQqUu\d\s])[A-Za-z]\s{0,1}\d(?=[^DdFfIiOoQqUu\d\s])[A-Za-z]\d$

🇨🇫Central African Republic

Phone Number
  • Pattern: ^(\+?236| ?)(70|75|77|72|21|22)\d{6}$
Postal Code
  • Pattern:

🇨🇱Chile

Phone Number
  • Pattern: ^(\+?56|0)[2-9]\d{1}\d{7}$
Postal Code
  • Pattern: ^\d{7}\s\(\d{3}-\d{4}\)$

🇨🇳China

Phone Number
  • Pattern: ^((\+|00)86)?(1[3-9]|9[28])\d{9}$
Postal Code
  • Pattern: ^\d{6}$

🇨🇴Colombia

Phone Number
  • Pattern: ^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$
Postal Code
  • Pattern: ^\d{6}$

🇨🇩Congo

Phone Number
  • Pattern: ^(\+?243|0)?(8|9)\d{8}$
Postal Code
  • Pattern:

🇨🇷Costa Rica

Phone Number
  • Pattern: ^(\+506)?[2-8]\d{7}$
Postal Code
  • Pattern: ^\d{4,5}$

🇭🇷Croatia

Phone Number
  • Pattern: ^\+385[1-9][0-9]{7,8}$
Postal Code
  • Pattern: ^\d{5}$

🇨🇺Cuba

Phone Number
  • Pattern: ^(\+53|0053)?5\d{7}$
Postal Code
  • Pattern: ^\d{5}$

🇨🇾Cyprus

Phone Number
  • Pattern: ^(\+?357?)?(9(9|6)\d{6})$
Postal Code
  • Pattern: ^\d{4}$

🇨🇿Czech Republic

Phone Number
  • Pattern: ^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$
Postal Code
  • Pattern: ^\d{5}\s\(\d{3}\s\d{2}\)$

🇩🇰Denmark

Phone Number
  • Pattern: ^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$
Postal Code
  • Pattern: ^\d{4}$

🇩🇴Dominican Republic

Phone Number
  • Pattern: ^(\+?1)?8[024]9\d{7}$
Postal Code
  • Pattern: ^\d{5}$

🇪🇨Ecuador

Phone Number
  • Pattern: ^(\+?593|0)([2-7]|9[2-9])\d{7}$
Postal Code
  • Pattern: ^\d{6}$

🇪🇬Egypt

Phone Number
  • Pattern: ^((\+?20)|0)?1[0125]\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇸🇻El Salvador

Phone Number
  • Pattern: ^(\+?503)?[67]\d{7}$
Postal Code
  • Pattern: ^1101$

🇪🇪Estonia

Phone Number
  • Pattern: ^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$
Postal Code
  • Pattern: ^\d{5}$

🇫🇴Faroe Islands

Phone Number
  • Pattern: ^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$
Postal Code
  • Pattern: ^\d{3}$

🇫🇯Fiji

Phone Number
  • Pattern: ^(\+?679)?\s?\d{3}\s?\d{4}$
Postal Code
  • Pattern:

🇫🇮Finland

Phone Number
  • Pattern: ^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$
Postal Code
  • Pattern: ^\d{5}$

🇫🇷France

Phone Number
  • Pattern: ^(\+?33|0)[67]\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇬🇫French Guiana

Phone Number
  • Pattern: ^(\+?594|0|00594)[67]\d{8}$
Postal Code
  • Pattern: ^973\d{2}$

🇵🇫French Polynesia

Phone Number
  • Pattern: ^(\+?689)?8[789]\d{6}$
Postal Code
  • Pattern: ^987\d{2}$

🇬🇪Georgia

Phone Number
  • Pattern: ^(\+?995)?(79\d{7}|5\d{8})$
Postal Code
  • Pattern: ^\d{4}$

🇩🇪Germany

Phone Number
  • Pattern: ^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$
Postal Code
  • Pattern: ^\d{5}$

🇬🇭Ghana

Phone Number
  • Pattern: ^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$
Postal Code
  • Pattern:

🇬🇷Greece

Phone Number
  • Pattern: ^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$
Postal Code
  • Pattern: ^\d{3}\s{0,1}\d{2}$

🇬🇱Greenland

Phone Number
  • Pattern: ^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$
Postal Code
  • Pattern: ^\d{4}$

🇬🇵Guadeloupe

Phone Number
  • Pattern: ^(\+?590|0|00590)[67]\d{8}$
Postal Code
  • Pattern: ^971\d{2}$

🇬🇬Guernsey

Phone Number
  • Pattern: ^(\+?44|0)1481\d{6}$
Postal Code
  • Pattern: ^[A-Za-z]{2}\d\s{0,1}\d[A-Za-z]{2}$

🇬🇾Guyana

Phone Number
  • Pattern: ^(\+592|0)6\d{6}$
Postal Code
  • Pattern:

🇭🇳Honduras

Phone Number
  • Pattern: ^(\+?504)?[9|8|3|2]\d{7}$
Postal Code
  • Pattern: ^\d{5}$

🇭🇰Hong Kong

Phone Number
  • Pattern: ^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$
Postal Code
  • Pattern:

🇭🇺Hungary

Phone Number
  • Pattern: ^(\+?36|06)(20|30|31|50|70)\d{7}$
Postal Code
  • Pattern: ^\d{4}$

🇮🇸Iceland

Phone Number
  • Pattern: ^\+354[0-9]{7}$
Postal Code
  • Pattern: ^\d{3}$

🇮🇳India

Phone Number
  • Pattern: ^(\+?91|0)?[6789]\d{9}$
Postal Code
  • Pattern: ^\d{6}$

🇮🇩Indonesia

Phone Number
  • Pattern: ^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$
Postal Code
  • Pattern: ^\d{5}$

🇮🇷Islamic Republic of Iran

Phone Number
  • Pattern: ^(\+98|0)?9\d{9}
Postal Code
  • Pattern: ^\d{5}-\d{5}$

🇮🇶Iraq

Phone Number
  • Pattern: ^(\+?964|0)?7[0-9]\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇮🇪Ireland

Phone Number
  • Pattern: ^(\+?353|0)8[356789]\d{7}$
Postal Code
  • Pattern:

🇮🇹Italy

Phone Number
  • Pattern: ^(\+?39)?\s?3\d{2} ?\d{6,7}$
Postal Code
  • Pattern: ^\d{5}$

🇯🇲Jamaica

Phone Number
  • Pattern: ^(\+?876)?\d{7}$
Postal Code
  • Pattern: ^\d{2}$

🇯🇵Japan

Phone Number
  • Pattern: ^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$
Postal Code
  • Pattern: ^\d{7}\s\(\d{3}-\d{4}\)$

🇯🇴Jordan

Phone Number
  • Pattern: ^(\+?962|0)?7[789]\d{7}$
Postal Code
  • Pattern: ^\d{5}$

🇰🇿Kazakhstan

Phone Number
  • Pattern: ^(\+?7|8)?7\d{9}$
Postal Code
  • Pattern: ^\d{6}$

🇰🇪Kenya

Phone Number
  • Pattern: ^(\+?254|0)(7|1)\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇰🇮Kiribati

Phone Number
  • Pattern: ^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$
Postal Code
  • Pattern:

🇰🇷South Korea

Phone Number
  • Pattern: ^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$
Postal Code
  • Pattern: ^\d{6}\s\(\d{3}-\d{3}\)$

🇽🇰Kosovo

Phone Number
  • Pattern: ^\+383[1-9][0-9]{6,7}$
Postal Code
  • Pattern: ^\d{5}$

🇰🇼Kuwait

Phone Number
  • Pattern: ^(\+?965)([569]\d{7}|41\d{6})$
Postal Code
  • Pattern: ^\d{5}$

🇰🇬Kyrgyzstan

Phone Number
  • Pattern: ^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$
Postal Code
  • Pattern: ^\d{6}$

🇱🇻Latvia

Phone Number
  • Pattern: ^(\+?371)2\d{7}$
Postal Code
  • Pattern: ^[Ll][Vv][- ]{0,1}\d{4}$

🇱🇧Lebanon

Phone Number
  • Pattern: ^(\+?961)?((3|81)\d{6}|7\d{7})$
Postal Code
  • Pattern: ^\d{4}\s{0,1}\d{4}$

🇱🇸Lesotho

Phone Number
  • Pattern: ^(\+?266)(22|28|57|58|59|27|52)\d{6}$
Postal Code
  • Pattern: ^\d{3}$

🇱🇾Libya

Phone Number
  • Pattern: ^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$
Postal Code
  • Pattern: ^\d{5}$

🇱🇮Liechtenstein

Phone Number
  • Pattern: ^\+423[0-9]{3,12}$
Postal Code
  • Pattern: ^\d{4}$

🇱🇹Lithuania

Phone Number
  • Pattern: ^(\+370|8)\d{8}$
Postal Code
  • Pattern: ^[Ll][Tt][- ]{0,1}\d{5}$

🇱🇺Luxembourg

Phone Number
  • Pattern: ^(\+352)?((6\d1)\d{6})$
Postal Code
  • Pattern: ^\d{4}$

🇲🇴Macao

Phone Number
  • Pattern: ^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$
Postal Code
  • Pattern:

🇲🇬Madagascar

Phone Number
  • Pattern: ^((\+?261|0)(2|3)\d)?\d{7}$
Postal Code
  • Pattern: ^\d{3}$

🇲🇼Malawi

Phone Number
  • Pattern: ^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$
Postal Code
  • Pattern:

🇲🇾Malaysia

Phone Number
  • Pattern: ^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$
Postal Code
  • Pattern: ^\d{5}$

🇲🇻Maldives

Phone Number
  • Pattern: ^(\+?960)?(7[2-9]|9[1-9])\d{5}$
Postal Code
  • Pattern: ^\d{4,5}$

🇲🇹Malta

Phone Number
  • Pattern: ^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$
Postal Code
  • Pattern: ^[A-Za-z]{3}\s{0,1}\d{4}$

🇲🇶Martinique

Phone Number
  • Pattern: ^(\+?596|0|00596)[67]\d{8}$
Postal Code
  • Pattern: ^972\d{2}$

🇲🇺Mauritius

Phone Number
  • Pattern: ^(\+?230|0)?\d{8}$
Postal Code
  • Pattern:

🇲🇽Mexico

Phone Number
  • Pattern: ^(\+?52)?(1|01)?\d{10,11}$
Postal Code
  • Pattern: ^\d{5}$

🇲🇩Moldova

Phone Number
  • Pattern: ^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$
Postal Code
  • Pattern: ^[M][D][- ]{0,1}\d{4}$

🇲🇨Monaco

Phone Number
  • Pattern: ^\+377[0-9]{8,9}$
Postal Code
  • Pattern: ^980\d{2}$

🇲🇳Mongolia

Phone Number
  • Pattern: ^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$
Postal Code
  • Pattern: ^\d{5}$

🇲🇪Montenegro

Phone Number
  • Pattern: ^\+382[6-9][0-9]{6,7}$
Postal Code
  • Pattern: ^\d{5}$

🇲🇦Morocco

Phone Number
  • Pattern: ^(?:(?:\+|00)212|0)[5-7]\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇲🇿Mozambique

Phone Number
  • Pattern: ^(\+?258)?8[234567]\d{7}$
Postal Code
  • Pattern: ^\d{4}$

🇲🇲Myanmar

Phone Number
  • Pattern: ^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$
Postal Code
  • Pattern: ^\d{5}$

🇳🇦Namibia

Phone Number
  • Pattern: ^(\+?264|0)(6|8)\d{7}$
Postal Code
  • Pattern: ^\d{5}$

🇳🇵Nepal

Phone Number
  • Pattern: ^(\+?977)?9[78]\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇳🇱Netherlands

Phone Number
  • Pattern: ^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$
Postal Code
  • Pattern: ^\d{4}\s{0,1}[A-Za-z]{2}$

🇳🇿New Zealand

Phone Number
  • Pattern: ^(\+?64|0)[28]\d{7,9}$
Postal Code
  • Pattern: ^\d{4}$

🇳🇮Nicaragua

Phone Number
  • Pattern: ^(\+?505)\d{7,8}$
Postal Code
  • Pattern: ^\d{5}$

🇳🇬Nigeria

Phone Number
  • Pattern: ^(\+?234|0)?[789]\d{9}$
Postal Code
  • Pattern: ^\d{6}$

🇲🇰North Macedonia

Phone Number
  • Pattern: ^\+389[2-9][0-9]{6,7}$
Postal Code
  • Pattern: ^\d{4}$

🇳🇴Norway

Phone Number
  • Pattern: ^(\+?47)?[49]\d{7}$
Postal Code
  • Pattern: ^\d{4}$

🇴🇲Oman

Phone Number
  • Pattern: ^((\+|00)968)?(9[1-9])\d{6}$
Postal Code
  • Pattern: ^\d{3}$

🇵🇰Pakistan

Phone Number
  • Pattern: ^((00|\+)?92|0)3[0-6]\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇵🇸Palestine

Phone Number
  • Pattern: ^(\+?970|0)5[6|9](\d{7}
Postal Code
  • Pattern: ^\d{5}$

🇵🇦Panama

Phone Number
  • Pattern: ^(\+?507)\d{7,8}$
Postal Code
  • Pattern: ^\d{6}$

🇵🇬Papua New Guinea

Phone Number
  • Pattern: ^(\+?675|0)?(7\d|8[18])\d{6}$
Postal Code
  • Pattern: ^\d{3}$

🇵🇾Paraguay

Phone Number
  • Pattern: ^(\+?595|0)9[9876]\d{7}$
Postal Code
  • Pattern: ^\d{4}$

🇵🇪Peru

Phone Number
  • Pattern: ^(\+?51)?9\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇵🇭Philippines

Phone Number
  • Pattern: ^(09|\+639)\d{9}$
Postal Code
  • Pattern: ^\d{4}$

🇵🇱Poland

Phone Number
  • Pattern: ^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$
Postal Code
  • Pattern: ^\d{2}[- ]{0,1}\d{3}$

🇵🇹Portugal

Phone Number
  • Pattern: ^(\+?351)?9[1236]\d{7}$
Postal Code
  • Pattern: ^\d{4}[- ]{0,1}\d{3}$ or ^\d{4}$

🇶🇦Qatar

Phone Number
  • Pattern: ^(\+974)?[3567]\d{7}$
Postal Code
  • Pattern:

🇷🇪Réunion

Phone Number
  • Pattern: ^(\+?262|0|00262)[67]\d{8}$
Postal Code
  • Pattern: ^974\d{2}$

🇷🇴Romania

Phone Number
  • Pattern: ^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$
Postal Code
  • Pattern: ^\d{6}$

🇷🇺Russia

Phone Number
  • Pattern: ^(\+?7|8)?9\d{9}$
Postal Code
  • Pattern: ^\d{6}$

🇷🇼Rwanda

Phone Number
  • Pattern: ^(\+?250|0)?[7]\d{8}$
Postal Code
  • Pattern:

🇰🇳Saint Kitts and Nevis

Phone Number
  • Pattern: ^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$
Postal Code
  • Pattern:

🇸🇲San Marino

Phone Number
  • Pattern: ^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$
Postal Code
  • Pattern: ^4789\d$

🇸🇦Saudi Arabia

Phone Number
  • Pattern: ^(!?(\+?966)|0)?5\d{8}$
Postal Code
  • Pattern: ^\d{5}(-{1}\d{4})?$

🇷🇸Serbia

Phone Number
  • Pattern: ^(\+3816|06)[- \d]{5,9}$
Postal Code
  • Pattern: ^\d{5}$

🇸🇱Sierra Leone

Phone Number
  • Pattern: ^(\+?232|0)\d{8}$
Postal Code
  • Pattern:

🇸🇬Singapore

Phone Number
  • Pattern: ^(\+65)?[3689]\d{7}$
Postal Code
  • Pattern: ^\d{2}$ or ^\d{4}$ or ^\d{6}$

🇸🇰Slovakia

Phone Number
  • Pattern: ^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$
Postal Code
  • Pattern: ^\d{5}\s\(\d{3}\s\d{2}\)$

🇸🇮Slovenia

Phone Number
  • Pattern: ^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$
Postal Code
  • Pattern: ^([S][I][- ]{0,1}){0,1}\d{4}$

🇸🇴Somalia

Phone Number
  • Pattern: ^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$
Postal Code
  • Pattern:

🇿🇦South Africa

Phone Number
  • Pattern: ^(\+?27|0)\d{9}$
Postal Code
  • Pattern:

🇸🇸South Sudan

Phone Number
  • Pattern: ^(\+?211|0)(9[1257])\d{7}$
Postal Code
  • Pattern: ^\d{4}$

🇪🇸Spain

Phone Number
  • Pattern: ^(\+?34)?[6|7]\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇱🇰Sri Lanka

Phone Number
  • Pattern: ^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$
Postal Code
  • Pattern: ^\d{5}$

🇸🇩Sudan

Phone Number
  • Pattern: ^((\+?249)|0)?(9[012369]|1[012])\d{7}$
Postal Code
  • Pattern: ^\d{5}$

🇸🇪Sweden

Phone Number
  • Pattern: ^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$
Postal Code
  • Pattern: ^\d{3}\s*\d{2}$

🇨🇭Switzerland

Phone Number
  • Pattern: ^(\+41|0)([1-9])\d{1,9}$
Postal Code
  • Pattern: ^\d{4}$

🇸🇾Syria

Phone Number
  • Pattern: ^(!?(\+?963)|0)?9\d{8}$
Postal Code
  • Pattern:

🇹🇼Taiwan

Phone Number
  • Pattern: ^(\+?886\-?|0)?9\d{8}$
Postal Code
  • Pattern: ^\d{5}$

🇹🇯Tajikistan

Phone Number
  • Pattern: ^(\+?992)?[5][5]\d{7}$
Postal Code
  • Pattern: ^\d{6}$

🇹🇿Tanzania

Phone Number
  • Pattern: ^(\+?255|0)?[67]\d{8}$
Postal Code
  • Pattern:

🇹🇭Thailand

Phone Number
  • Pattern: ^(\+66|66|0)\d{9}$
Postal Code
  • Pattern: ^\d{5}$

🇹🇳Tunisia

Phone Number
  • Pattern: ^(\+?216)?[2459]\d{7}$
Postal Code
  • Pattern: ^\d{4}$

🇹🇷Turkey

Phone Number
  • Pattern: ^(\+?90|0)?5\d{9}$
Postal Code
  • Pattern: ^\d{5}$

🇹🇲Turkmenistan

Phone Number
  • Pattern: ^(\+993|993|8)\d{8}$
Postal Code
  • Pattern: ^\d{6}$

🇺🇬Uganda

Phone Number
  • Pattern: ^(\+?256|0)?[7]\d{8}$
Postal Code
  • Pattern:

🇺🇦Ukraine

Phone Number
  • Pattern: ^(\+?38|8)?0\d{9}$
Postal Code
  • Pattern: ^\d{5}$

🇦🇪United Arab Emirates

Phone Number
  • Pattern: ^((\+?971)|0)?5[024568]\d{7}$
Postal Code
  • Pattern:

🇬🇧United Kingdom

Phone Number
  • Pattern: ^(\+?44|0)7\d{9}$
Postal Code
  • Pattern: ^[A-Z]{1,2}[0-9R][0-9A-Z]?\s*[0-9][A-Z-[CIKMOV]]{2}

🇺🇸United States of America

Phone Number
  • Pattern: ^(\+1[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{3}[-.\s]?\d{4}$
Postal Code
  • Pattern: ^\b\d{5}\b(?:[- ]{1}\d{4})?$

🇺🇾Uruguay

Phone Number
  • Pattern: ^(\+598|0)9[1-9][\d]{6}$
Postal Code
  • Pattern: ^\d{5}$

🇺🇿Uzbekistan

Phone Number
  • Pattern: ^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$
Postal Code
  • Pattern: ^\d{3} \d{3}$

🇻🇪Venezuela

Phone Number
  • Pattern: ^(\+?58)?(2|4)\d{9}$
Postal Code
  • Pattern: ^\d{4}(\s[a-zA-Z]{1})?$

🇻🇳Vietnam

Phone Number
  • Pattern: ^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$
Postal Code
  • Pattern: ^\d{6}$

🇼🇫Wallis and Futuna

Phone Number
  • Pattern: ^(\+681)?\d{6}$
Postal Code
  • Pattern: ^986\d{2}$

🇪🇭Western Sahara

Phone Number
  • Pattern: ^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$
Postal Code
  • Pattern:

🇾🇪Yemen

Phone Number
  • Pattern: ^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$
Postal Code
  • Pattern:

🇿🇲Zambia

Phone Number
  • Pattern: ^(\+?26)?09[567]\d{7}$
Postal Code
  • Pattern: ^\d{5}$

🇿🇼Zimbabwe

Phone Number
  • Pattern: ^(\+263)[0-9]{9}$
Postal Code
  • Pattern:

About

This repository contains regular expression (regex) patterns for validating phone numbers & postal codes for All countries.

Resources

License

Stars

Watchers

Forks