Updating libphonenumber to r209.

Change-Id: Ib409830ea1ef5b26a3e4178d5b40979516f83d75
diff --git a/README.android b/README.android
index 2641eb6..026ab5d 100644
--- a/README.android
+++ b/README.android
@@ -1,4 +1,4 @@
 URL: http://code.google.com/p/libphonenumber/
-Version: r136
+Version: r206
 License: Apache 2
 Description: Google Phone Number Library.
diff --git a/java/pom.xml b/java/pom.xml
index c610776..92134a6 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -3,7 +3,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.googlecode.libphonenumber</groupId>
   <artifactId>libphonenumber</artifactId>
-  <version>3.0.1-SNAPSHOT</version>
+  <version>3.5-SNAPSHOT</version>
   <packaging>jar</packaging>
   <name>libphonenumber</name>
   <url>http://code.google.com/p/libphonenumber/</url>
@@ -125,6 +125,15 @@
           </tagBase>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.3.2</version>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/java/release_notes.txt b/java/release_notes.txt
index 1873786..1963e56 100644
--- a/java/release_notes.txt
+++ b/java/release_notes.txt
@@ -1,3 +1,65 @@
+May 24th, 2011
+* Code changes:
+ - Phonenumber now implements Serializable.
+ - findNumbers doesn't accept numbers with mis-matched brackets as phone-numbers
+ - An offline phone number geocoder has been added. The current implementation just returns the
+   region name for the phone number; more detailed geocoding will be added later.
+* Metadata changes:
+ - New countries: GF, KP, NC, PA, PF, PW, PY, SB, SR, TO, UY, VU
+ - Updates: CY, CZ, ES, GB, GQ, JM, MQ, TN, VI
+
+May 9th, 2011
+* Code changes:
+ - Fixed potential for a null-ptr exception in getExampleNumber
+ - Potential speed improvement with replacement of StringBuffer with StringBuilder
+* Metadata changes
+ - Changed way that international formats are specified to make it easier to do so
+ - New countries: AX, CC, CX, WF
+ - Updates: AM, AR, AU, AW, CN, CO, CR, DM, EC, ET, FI, FJ, GH, IN, JP, KE, KM,
+   KN, LR, MD, MQ, MX, NP, PH, SC, SE, SM, SN, SY, UG, US, VC, VI, ZM
+
+Apr 26th, 2011
+* Code changes:
+ - Improved PhoneNumberMatcher for cases with other numbers before or after the phone number.
+ - Improved AsYouTypeFormatter not to use formatting rules containing non-formatting characters
+   (e.g. '*' in Israeli star numbers).
+* Metadata changes:
+ - New countries: FJ, FM, GY, NF, NI, NR, TV.
+ - Updates: AM, AZ, BF, BW, BZ, CI, CR, GB, GP, HK, JM, KH, LB, LY, MV, PE, PK, SZ, TJ, US.
+* Minor documentation updates
+
+Apr 11th, 2011
+* Bug fixes:
+ - Adding date exclusion pattern in PhoneNumberMatcher.
+ - Fixing bug with selecting a suitable region for numbers with leading zeros where mutiple regions
+   for that country code are possible.
+* Metadata changes:
+ - Updates: AG, AI, AS, BB, BM, BS, CA, DM, DO, ET, FO, GD, GE, GU, IN, JM, KN, KY, LC, MN, MP, MR,
+   MS, NO, PR, TC, TR, TT, US, VC, VG, VI
+ - New countries: CK, FK, GT, IO, KI, SJ, SV
+* Documentation updates and some small refactoring to AsYouTypeFormatter
+
+Mar 31st, 2011
+* New functionality:
+ - Can parse and format numbers in RFC-3966 format.
+ - Added isAlphaNumber to check to see if a number is a "vanity" or "alpha" number
+ - Can format a number made up of alpha-characters in an "out-of-country" format (e.g. 0011 1
+   800-SIX-FLAG to dial an American alpha-number from Australia).
+* Code changes:
+ - Renamed private vars, private methods and fixed comments to try and differentiate between country
+   (calling) codes and region codes.
+ == Non-backwards-compatible API changes: ==
+ - Renamed getSupportedCountries to getSupportedRegions, as this more accurately reflects that the
+   library is based around region codes.
+ - getNationalSignificantNumber is no longer a static method, but is instead an instance method.
+* Metadata changes:
+ - Bug-fixes and updates for AU, AZ, EE, FI, IN, JO, KW, KZ, MV, RU, RR, VA
+ - New country: ME
+
+Mar 22nd, 2011
+* Metadata changes:
+ - New mobile-number pattern for AU
+
 Mar 10th, 2011
 * New functionality:
  - New function to format a number with the preferred domestic carrier code used when parsing,
diff --git a/java/resources/com/google/i18n/phonenumbers/BuildMetadataFromXml.java b/java/resources/com/google/i18n/phonenumbers/BuildMetadataFromXml.java
index 04f7849..a73ffee 100644
--- a/java/resources/com/google/i18n/phonenumbers/BuildMetadataFromXml.java
+++ b/java/resources/com/google/i18n/phonenumbers/BuildMetadataFromXml.java
@@ -80,7 +80,7 @@
       String regionCode = metadata.getId();
       int countryCode = metadata.getCountryCode();
       if (countryCodeToRegionCodeMap.containsKey(countryCode)) {
-        if (metadata.getMainCountryForCode()) {
+        if (metadata.isMainCountryForCode()) {
           countryCodeToRegionCodeMap.get(countryCode).add(0, regionCode);
         } else {
           countryCodeToRegionCodeMap.get(countryCode).add(regionCode);
@@ -154,14 +154,20 @@
     if (element.hasAttribute("mainCountryForCode")) {
       metadata.setMainCountryForCode(true);
     }
+    if (element.hasAttribute("leadingZeroPossible")) {
+      metadata.setLeadingZeroPossible(true);
+    }
 
     // Extract availableFormats
     NodeList numberFormatElements = element.getElementsByTagName("numberFormat");
+    boolean hasExplicitIntlFormatDefined = false;
+
     int numOfFormatElements = numberFormatElements.getLength();
     if (numOfFormatElements > 0) {
       for (int i = 0; i < numOfFormatElements; i++) {
         Element numberFormatElement = (Element) numberFormatElements.item(i);
         NumberFormat format = new NumberFormat();
+
         if (numberFormatElement.hasAttribute("nationalPrefixFormattingRule")) {
           format.setNationalPrefixFormattingRule(
               getNationalPrefixFormattingRuleFromElement(numberFormatElement, nationalPrefix));
@@ -175,28 +181,11 @@
         } else {
           format.setDomesticCarrierCodeFormattingRule(carrierCodeFormattingRule);
         }
-        setLeadingDigitsPatterns(numberFormatElement, format);
-        format.setPattern(validateRE(numberFormatElement.getAttribute("pattern")));
-        NodeList formatPattern = numberFormatElement.getElementsByTagName("format");
-        if (formatPattern.getLength() != 1) {
-          LOGGER.log(Level.SEVERE,
-                     "Only one format pattern for a numberFormat element should be defined.");
-          throw new RuntimeException("Invalid number of format patterns for country: " +
-                                     regionCode);
-        }
-        format.setFormat(formatPattern.item(0).getFirstChild().getNodeValue());
-        metadata.addNumberFormat(format);
-      }
-    }
 
-    NodeList intlNumberFormatElements = element.getElementsByTagName("intlNumberFormat");
-    int numOfIntlFormatElements = intlNumberFormatElements.getLength();
-    if (numOfIntlFormatElements > 0) {
-      for (int i = 0; i < numOfIntlFormatElements; i++) {
-        Element numberFormatElement = (Element) intlNumberFormatElements.item(i);
-        NumberFormat format = new NumberFormat();
+        // Extract the pattern for the national format.
         setLeadingDigitsPatterns(numberFormatElement, format);
         format.setPattern(validateRE(numberFormatElement.getAttribute("pattern")));
+
         NodeList formatPattern = numberFormatElement.getElementsByTagName("format");
         if (formatPattern.getLength() != 1) {
           LOGGER.log(Level.SEVERE,
@@ -204,15 +193,46 @@
           throw new RuntimeException("Invalid number of format patterns for country: " +
                                      regionCode);
         }
-        format.setFormat(validateRE(formatPattern.item(0).getFirstChild().getNodeValue()));
-        if (numberFormatElement.hasAttribute("carrierCodeFormattingRule")) {
-          format.setDomesticCarrierCodeFormattingRule(validateRE(
-              getDomesticCarrierCodeFormattingRuleFromElement(numberFormatElement,
-                                                              nationalPrefix)));
+        String nationalFormat = formatPattern.item(0).getFirstChild().getNodeValue();
+        format.setFormat(nationalFormat);
+        metadata.addNumberFormat(format);
+
+        // Extract the pattern for international format. If there is no intlFormat, default to
+        // using the national format. If the intlFormat is set to "NA" the intlFormat should be
+        // ignored.
+        NumberFormat intlFormat = new NumberFormat();
+        setLeadingDigitsPatterns(numberFormatElement, intlFormat);
+        intlFormat.setPattern(numberFormatElement.getAttribute("pattern"));
+        NodeList intlFormatPattern = numberFormatElement.getElementsByTagName("intlFormat");
+
+        if (intlFormatPattern.getLength() > 1) {
+          LOGGER.log(Level.SEVERE,
+                     "A maximum of one intlFormat pattern for a numberFormat element should be " +
+                     "defined.");
+          throw new RuntimeException("Invalid number of intlFormat patterns for country: " +
+                                     regionCode);
+        } else if (intlFormatPattern.getLength() == 0) {
+          // Default to use the same as the national pattern if none is defined.
+          intlFormat.setFormat(nationalFormat);
         } else {
-          format.setDomesticCarrierCodeFormattingRule(carrierCodeFormattingRule);
+           String intlFormatPatternValue =
+               intlFormatPattern.item(0).getFirstChild().getNodeValue();
+           if (!intlFormatPatternValue.equals("NA")) {
+             intlFormat.setFormat(intlFormatPatternValue);
+           }
+           hasExplicitIntlFormatDefined = true;
         }
-        metadata.addIntlNumberFormat(format);
+
+        if (intlFormat.hasFormat()) {
+          metadata.addIntlNumberFormat(intlFormat);
+        }
+      }
+      // Only a small number of regions need to specify the intlFormats in the xml. For the majority
+      // of countries the intlNumberFormat metadata is an exact copy of the national NumberFormat
+      // metadata. To minimize the size of the metadata file, we only keep intlNumberFormats that
+      // actually differ in some way to the national formats.
+      if (!hasExplicitIntlFormatDefined) {
+        metadata.clearIntlNumberFormat();
       }
     }
 
diff --git a/java/resources/com/google/i18n/phonenumbers/proto/phonemetadata.proto b/java/resources/com/google/i18n/phonenumbers/proto/phonemetadata.proto
deleted file mode 100644
index 42f0a99..0000000
--- a/java/resources/com/google/i18n/phonenumbers/proto/phonemetadata.proto
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Definition of protocol buffer for holding metadata for international
-// telephone numbers.
-// @author Shaopeng Jia
-
-syntax = "proto2";
-
-option java_package = "com.google.i18n.phonenumbers";
-option optimize_for = LITE_RUNTIME;
-package i18n.phonenumbers;
-
-message NumberFormat {
-  // pattern is a regex that is used to match the national (significant)
-  // number. For example, the pattern "(20)(\d{4})(\d{4})" will match number
-  // "2070313000", which is the national (significant) number for Google London.
-  // Note the presence of the parentheses, which are capturing groups what
-  // specifies the grouping of numbers.
-  required string pattern = 1;
-
-  // format specifies how the national (significant) number matched by
-  // pattern should be formatted.
-  // Using the same example as above, format could contain "$1 $2 $3",
-  // meaning that the number should be formatted as "20 7031 3000".
-  // Each $x are replaced by the numbers captured by group x in the
-  // regex specified by pattern.
-  required string format = 2;
-
-  // This field is a regex that is used to match a certain number of digits
-  // at the beginning of the national (significant) number. When the match is
-  // successful, the accompanying pattern and format should be used to format
-  // this number. For example, if leading_digits="[1-3]|44", then all the
-  // national numbers starting with 1, 2, 3 or 44 should be formatted using the
-  // accompanying pattern and format.
-  //
-  // The first leadingDigitsPattern matches up to the first three digits of the
-  // national (significant) number; the next one matches the first four digits,
-  // then the first five and so on, until the leadingDigitsPattern can uniquely
-  // identify one pattern and format to be used to format the number.
-  //
-  // In the case when only one formatting pattern exists, no
-  // leading_digits_pattern is needed.
-  repeated string leading_digits_pattern = 3;
-
-  // This field specifies how the national prefix ($NP) together with the first
-  // group ($FG) in the national significant number should be formatted in
-  // the NATIONAL format when a national prefix exists for a certain country.
-  // For example, when this field contains "($NP$FG)", a number from Beijing,
-  // China (whose $NP = 0), which would by default be formatted without
-  // national prefix as 10 1234 5678 in NATIONAL format, will instead be
-  // formatted as (010) 1234 5678; to format it as (0)10 1234 5678, the field
-  // would contain "($NP)$FG". Note $FG should always be present in this field,
-  // but $NP can be omitted. For example, having "$FG" could indicate the
-  // number should be formatted in NATIONAL format without the national prefix.
-  // This is commonly used to override the rule from generalDesc.
-  //
-  // When this field is missing, a number will be formatted without national
-  // prefix in NATIONAL format. This field does not affect how a number
-  // is formatted in other formats, such as INTERNATIONAL.
-  optional string national_prefix_formatting_rule = 4;
-
-  // This field specifies how any carrier code ($CC) together with the first
-  // group ($FG) in the national significant number should be formatted
-  // when formatWithCarrierCode is called, if carrier codes are used for a
-  // certain country.
-  optional string domestic_carrier_code_formatting_rule = 5;
-}
-
-message PhoneNumberDesc {
-  // The national_number_pattern is the pattern that a valid national
-  // significant number would match. This specifies information such as its
-  // total length and leading digits.
-  optional string national_number_pattern = 2;
-
-  // The possible_number_pattern represents what a potentially valid phone
-  // number for this region may be written as. This is a superset of the
-  // national_number_pattern above and includes numbers that have the area code
-  // omitted. Typically the only restrictions here are in the number of digits.
-  // This could be used to highlight tokens in a text that may be a phone
-  // number, or to quickly prune numbers that could not possibly be a phone
-  // number for this locale.
-  optional string possible_number_pattern = 3;
-
-  // An example national significant number for the specific type. It should
-  // not contain any formatting information.
-  optional string example_number = 6;
-}
-
-message PhoneMetadata {
-  // The general_desc contains information which is a superset of descriptions
-  // for all types of phone numbers. If any element is missing in the
-  // description of a specific type in the XML file, the element will inherit
-  // from its counterpart in the general_desc. Every locale is assumed to have
-  // fixed line and mobile numbers - if these types are missing in the XML
-  // file, they will inherit all fields from the general_desc. For all other
-  // types, if the whole type is missing in the xml file, it will be given a
-  // national_number_pattern of "NA" and a possible_number_pattern of "NA".
-  required PhoneNumberDesc general_desc = 1;
-  required PhoneNumberDesc fixed_line = 2;
-  required PhoneNumberDesc mobile = 3;
-  required PhoneNumberDesc toll_free = 4;
-  required PhoneNumberDesc premium_rate = 5;
-  required PhoneNumberDesc shared_cost = 6;
-  required PhoneNumberDesc personal_number = 7;
-  required PhoneNumberDesc voip = 8;
-  required PhoneNumberDesc pager = 21;
-  required PhoneNumberDesc uan = 25;
-  // The rules here distinguish the numbers that are only able to be dialled
-  // nationally.
-  required PhoneNumberDesc no_international_dialling = 24;
-
-  // The ISO 3166-1 alpha-2 representation of a country/region
-  required string id = 9;
-
-  // The country calling code that one would dial from overseas when trying to
-  // dial a phone number in this country. For example, this would be "64" for
-  // New Zealand.
-  required int32 country_code = 10;
-
-  // The international_prefix of country A is the number that needs to be
-  // dialled from country A to another country (country B). This is followed
-  // by the country code for country B. Note that some countries may have more
-  // than one international prefix, and for those cases, a regular expression
-  // matching the international prefixes will be stored in this field.
-  required string international_prefix = 11;
-
-  // If more than one international prefix is present, a preferred prefix can
-  // be specified here for out-of-country formatting purposes. If this field is
-  // not present, and multiple international prefixes are present, then "+"
-  // will be used instead.
-  optional string preferred_international_prefix = 17;
-
-  // The national prefix of country A is the number that needs to be dialled
-  // before the national significant number when dialling internally. This
-  // would not be dialled when dialling internationally. For example, in New
-  // Zealand, the number that would be locally dialled as 09 345 3456 would be
-  // dialled from overseas as +64 9 345 3456. In this case, 0 is the national
-  // prefix.
-  optional string national_prefix = 12;
-
-  // The preferred prefix when specifying an extension in this country. This is
-  // used for formatting only, and if this is not specified, a suitable default
-  // should be used instead. For example, if you wanted extensions to be
-  // formatted in the following way:
-  // 1 (365) 345 445 ext. 2345
-  // " ext. "  should be the preferred extension prefix.
-  optional string preferred_extn_prefix = 13;
-
-  // This field is used for cases where the national prefix of a country
-  // contains a carrier selection code, and is written in the form of a
-  // regular expression. For example, to dial the number 2222-2222 in
-  // Fortaleza, Brazil (area code 85) using the long distance carrier Oi
-  // (selection code 31), one would dial 0 31 85 2222 2222. Assuming the
-  // only other possible carrier selection code is 32, the field will
-  // contain "03[12]".
-  //
-  // When it is missing from the XML file, this field inherits the value of
-  // national_prefix, if that is present.
-  optional string national_prefix_for_parsing = 15;
-
-  // This field is only populated and used under very rare situations.
-  // For example, mobile numbers in Argentina are written in two completely
-  // different ways when dialed in-country and out-of-country
-  // (e.g. 0343 15 555 1212 is exactly the same number as +54 9 343 555 1212).
-  // This field is used together with national_prefix_for_parsing to transform
-  // the number into a particular representation for storing in the phonenumber
-  // proto buffer in those rare cases.
-  optional string national_prefix_transform_rule = 16;
-
-  // Specifies whether the mobile and fixed-line patterns are the same or not.
-  // This is used to speed up determining phone number type in countries where
-  // these two types of phone numbers can never be distinguished.
-  optional bool same_mobile_and_fixed_line_pattern = 18 [default=false];
-
-  // Note that the number format here is used for formatting only, not parsing.
-  // Hence all the varied ways a user *may* write a number need not be recorded
-  // - just the ideal way we would like to format it for them. When this element
-  // is absent, the national significant number will be formatted as a whole
-  // without any formatting applied.
-  repeated NumberFormat number_format = 19;
-
-  // This field is populated only when the national significant number is
-  // formatted differently when it forms part of the INTERNATIONAL format
-  // and NATIONAL format. A case in point is mobile numbers in Argentina:
-  // The number, which would be written in INTERNATIONAL format as
-  // +54 9 343 555 1212, will be written as 0343 15 555 1212 for NATIONAL
-  // format. In this case, the prefix 9 is inserted when dialling from
-  // overseas, but otherwise the prefix 0 and the carrier selection code
-  // 15 (inserted after the area code of 343) is used.
-  repeated NumberFormat intl_number_format = 20;
-
-  // This field is set when this country is considered to be the main country
-  // for a calling code. It may not be set by more than one country with the
-  // same calling code, and it should not be set by countries with a unique
-  // calling code. This can be used to indicate that "GB" is the main country
-  // for the calling code "44" for example, rather than Jersey or the Isle of
-  // Man.
-  optional bool main_country_for_code = 22 [default=false];
-
-  // This field is populated only for countries or regions that share a country
-  // calling code. If a number matches this pattern, it could belong to this
-  // region. This is not intended as a replacement for IsValidForRegion, and
-  // does not mean the number must come from this region (for example, 800
-  // numbers are valid for all NANPA countries.) This field should be a regular
-  // expression of the expected prefix match.
-  optional string leading_digits = 23;
-}
-
-message PhoneMetadataCollection {
-  repeated PhoneMetadata metadata = 1;
-}
diff --git a/java/resources/com/google/i18n/phonenumbers/proto/phonenumber.proto b/java/resources/com/google/i18n/phonenumbers/proto/phonenumber.proto
deleted file mode 100644
index 8a5e7ab..0000000
--- a/java/resources/com/google/i18n/phonenumbers/proto/phonenumber.proto
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Definition of protocol buffer for representing international telephone numbers.
-// @author Shaopeng Jia
-
-syntax = "proto2";
-
-option java_package = "com.google.i18n.phonenumbers";
-option optimize_for = LITE_RUNTIME;
-package i18n.phonenumbers;
-
-message PhoneNumber {
-// The country calling code for this number, as defined by the International Telecommunication Union
-// (ITU). Fox example, this would be 1 for NANPA countries, and 33 for France.
-  required int32 country_code = 1;
-
-// National (significant) Number is defined in International Telecommunication Union Recommendation
-// E.164. It is a language/country-neutral representation of a phone number at a country level. For
-// countries which have the concept of Area Code, the National (significant) Number contains the
-// area code. It contains a maximum number of digits which equal to 15 - n, where n is the number of
-// digits of the country code. Take note that National (significant) Number does not contain
-// National(trunk) prefix. Obviously, as a uint64, it will never contain any formatting (hypens,
-// spaces, parentheses), nor any alphanumeric spellings.
-  required uint64 national_number = 2;
-
-// Extension is not standardized in ITU recommendations, except for being defined as a series of
-// numbers with a maximum length of 40 digits. It is defined as a string here to accommodate for the
-// possible use of a leading zero in the extension (organizations have complete freedom to do so,
-// as there is no standard defined). However, only ASCII digits should be stored here.
-  optional string extension = 3;
-
-// In some countries, the national (significant) number starts with a "0" without this being a
-// national prefix or trunk code of some kind. For example, the leading zero in the national
-// (significant) number of an Italian phone number indicates the number is a fixed-line number.
-// There have been plans to migrate fixed-line numbers to start with the digit two since December
-// 2000, but it has not happened yet. See http://en.wikipedia.org/wiki/%2B39 for more details.
-//
-// This field can be safely ignored (there is no need to set it) for most countries. Some limited
-// amount of countries behave like Italy - for these cases, if the leading zero of a number would be
-// retained even when dialling internationally, set this flag to true.
-//
-// Clients who use the parsing functionality of the i18n phone number libraries
-// will have this field set if necessary automatically.
-  optional bool italian_leading_zero = 4;
-
-// The next few fields are non-essential fields for a phone number. They retain extra information
-// about the form the phone number was in when it was provided to us to parse. They can be safely
-// ignored by most clients.
-
-// This field is used to store the raw input string containing phone numbers before it was
-// canonicalized by the library. For example, it could be used to store alphanumerical numbers
-// such as "1-800-GOOG-411".
-  optional string raw_input = 5;
-
-// The source from which the country_code is derived. This is not set in the general parsing method,
-// but in the method that parses and keeps raw_input. New fields could be added upon request.
-  enum CountryCodeSource {
-    // The country_code is derived based on a phone number with a leading "+", e.g. the French
-    // number "+33 (0)1 42 68 53 00".
-    FROM_NUMBER_WITH_PLUS_SIGN = 1;
-
-    // The country_code is derived based on a phone number with a leading IDD, e.g. the French
-    // number "011 33 (0)1 42 68 53 00", as it is dialled from US.
-    FROM_NUMBER_WITH_IDD = 5;
-
-    // The country_code is derived based on a phone number without a leading "+", e.g. the French
-    // number "33 (0)1 42 68 53 00" when defaultCountry is supplied as France.
-    FROM_NUMBER_WITHOUT_PLUS_SIGN = 10;
-
-    // The country_code is derived NOT based on the phone number itself, but from the defaultCountry
-    // parameter provided in the parsing function by the clients. This happens mostly for numbers
-    // written in the national format (without country code). For example, this would be set when
-    // parsing the French number "(0)1 42 68 53 00", when defaultCountry is supplied as France.
-    FROM_DEFAULT_COUNTRY = 20;
-  }
-
-// The source from which the country_code is derived.
-  optional CountryCodeSource country_code_source = 6;
-
-// The carrier selection code that is preferred when calling this phone number domestically. This
-// also includes codes that need to be dialed in some countries when calling from landlines to
-// mobiles or vice versa. For example, in Columbia, a "3" needs to be dialed before the phone number
-// itself when calling from a mobile phone to a domestic landline phone and vice versa.
-//
-// Note this is the "preferred" code, which means other codes may work as well.
-  optional string preferred_domestic_carrier_code = 7;
-}
-
-// Examples
-//
-// Google MTV, +1 650-253-0000, (650) 253-0000
-// country_code: 1
-// national_number: 6502530000
-//
-// Google Paris, +33 (0)1 42 68 53 00, 01 42 68 53 00
-// country_code: 33
-// national_number: 142685300
-//
-// Google Beijing, +86-10-62503000, (010) 62503000
-// country_code: 86
-// national_number: 1062503000
-//
-// Google Italy, +39 02-36618 300, 02-36618 300
-// country_code: 39
-// national_number: 236618300
-// italian_leading_zero: true
diff --git a/java/resources/com/google/i18n/phonenumbers/src/PhoneNumberMetaData.xml b/java/resources/com/google/i18n/phonenumbers/src/PhoneNumberMetaData.xml
deleted file mode 100644
index 86ea951..0000000
--- a/java/resources/com/google/i18n/phonenumbers/src/PhoneNumberMetaData.xml
+++ /dev/null
@@ -1,18425 +0,0 @@
-<!-- Copyright (C) 2009 Google Inc.
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
-
-     @author: Shaopeng Jia
-     @author: Lara Rennie
-
-     MetaData on Phone Number Plan and formatting rules
-     Note: Territories are in alphabetical order by their IDs, which are based on ISO 3166-1
-           two-letter country codes. The country names in the comments are the official short names
-           in English according to ISO 3166-1.
-
-     For more information on what each element represents, see
-     java/com/google/i18n/phonenumbers/phonemetadata.proto
-
-     Note that if you want to add validation metadata, the generalDesc nationalNumberPattern and
-     possibleNumberPattern must be provided. If this is missing, then the country will be
-     considered to have no more specific phone-number type metadata (fixedLine, mobile etc) and
-     hence only basic validation rules (numbers should be between 3 and 15 digits long) will be
-     applied.
-
-     Country code, international and national prefix information main source:
-     http://www.itu.int/publ/T-SP-E.164C-2010/en
--->
-
-<!DOCTYPE phoneNumberMetadata [
-    <!ELEMENT phoneNumberMetadata (territories)>
-    <!ELEMENT territories (territory+)>
-    <!ELEMENT territory (availableFormats?, generalDesc?, noInternationalDialling?,
-        areaCodeOptional?, fixedLine?, mobile?, pager?, tollFree?, premiumRate?,
-        sharedCost?, personalNumber?, voip?, uan?, shortCode?)>
-    <!ELEMENT generalDesc (nationalNumberPattern, possibleNumberPattern)>
-    <!ELEMENT noInternationalDialling (nationalNumberPattern, possibleNumberPattern,
-        exampleNumber?)>
-    <!ELEMENT areaCodeOptional (nationalNumberPattern, possibleNumberPattern, exampleNumber?)>
-    <!ELEMENT fixedLine (nationalNumberPattern?, possibleNumberPattern?, exampleNumber?)>
-    <!ELEMENT mobile (nationalNumberPattern?, possibleNumberPattern?, exampleNumber?)>
-    <!ELEMENT pager (nationalNumberPattern?, possibleNumberPattern?, exampleNumber?)>
-    <!ELEMENT tollFree (nationalNumberPattern?, possibleNumberPattern?, exampleNumber?)>
-    <!ELEMENT premiumRate (nationalNumberPattern?, possibleNumberPattern?, exampleNumber?)>
-    <!ELEMENT sharedCost (nationalNumberPattern?, possibleNumberPattern?, exampleNumber?)>
-    <!ELEMENT personalNumber (nationalNumberPattern?, possibleNumberPattern?, exampleNumber?)>
-    <!ELEMENT voip (nationalNumberPattern?, possibleNumberPattern?, exampleNumber?)>
-    <!ELEMENT uan (nationalNumberPattern?, possibleNumberPattern?, exampleNumber?)>
-    <!ELEMENT shortCode (nationalNumberPattern?, possibleNumberPattern?, exampleNumber?)>
-    <!ELEMENT availableFormats (numberFormat+, intlNumberFormat*)>
-    <!ELEMENT nationalNumberPattern (#PCDATA)>
-    <!ELEMENT possibleNumberPattern (#PCDATA)>
-    <!ELEMENT exampleNumber (#PCDATA)>
-    <!ELEMENT numberFormat (leadingDigits*, format)>
-    <!ELEMENT intlNumberFormat (leadingDigits*, format)>
-    <!ELEMENT format (#PCDATA)>
-    <!ELEMENT leadingDigits (#PCDATA)>
-
-    <!ATTLIST territory id CDATA #REQUIRED>
-    <!ATTLIST territory countryCode CDATA #REQUIRED>
-    <!ATTLIST territory leadingDigits CDATA #IMPLIED>
-    <!ATTLIST territory preferredInternationalPrefix CDATA #IMPLIED>
-    <!ATTLIST territory internationalPrefix CDATA #REQUIRED>
-    <!ATTLIST territory nationalPrefix CDATA #IMPLIED>
-    <!ATTLIST territory nationalPrefixForParsing CDATA #IMPLIED>
-    <!ATTLIST territory nationalPrefixTransformRule CDATA #IMPLIED>
-    <!ATTLIST territory preferredExtnPrefix CDATA #IMPLIED>
-    <!ATTLIST territory nationalPrefixFormattingRule CDATA #IMPLIED>
-    <!ATTLIST territory mainCountryForCode (true) #IMPLIED>
-    <!ATTLIST territory carrierCodeFormattingRule CDATA #IMPLIED>
-    <!ATTLIST numberFormat nationalPrefixFormattingRule CDATA #IMPLIED>
-    <!ATTLIST numberFormat carrierCodeFormattingRule CDATA #IMPLIED>
-    <!ATTLIST numberFormat pattern CDATA #REQUIRED>
-    <!ATTLIST intlNumberFormat pattern CDATA #REQUIRED>
-    <!ATTLIST intlNumberFormat carrierCodeFormattingRule CDATA #IMPLIED>
-]>
-
-<phoneNumberMetadata>
-  <territories>
-    <!-- Ascension Island -->
-    <!-- www.itu.int/oth/T02020000AF -->
-    <territory id="AC" countryCode="247" internationalPrefix="00">
-      <!-- Formatted as a block. -->
-      <generalDesc>
-        <nationalNumberPattern>[2-46]\d{3}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            3[0-5]|
-            4[4-6]|
-            [26]\d
-          )\d{2}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4}</possibleNumberPattern>
-        <exampleNumber>6889</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>NA</nationalNumberPattern>
-        <possibleNumberPattern>NA</possibleNumberPattern>
-      </mobile>
-    </territory>
-
-    <!-- Andorra -->
-    <!-- http://www.itu.int/oth/T0202000005/en -->
-    <territory id="AD" countryCode="376" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{3})">
-          <leadingDigits>[346-9]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(180[02])(\d{4})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          (?:
-            [346-9]|
-            180
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[78]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-        <exampleNumber>712345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[346]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-        <exampleNumber>312345</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- Note that the definitions of 1800 and 1802 numbers differ in the plan and on the
-             Andorran www.sta.ad website, but we consider both to be freephone here. -->
-        <nationalNumberPattern>180[02]\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>18001234</exampleNumber>
-      </tollFree>
-      <!-- The national numbering plan says that numbers beginning with 9 are reserved for special
-           services, so we assume they are premium rate here, although we cannot find examples
-           online. -->
-      <premiumRate>
-        <nationalNumberPattern>9\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-        <exampleNumber>912345</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!--  United Arab Emirates -->
-    <!-- http://www.itu.int/oth/T02020000DC/en -->
-    <territory id="AE" countryCode="971" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([2-4679])(\d{3})(\d{4})">
-          <leadingDigits>[2-4679][2-8]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(5[056])(\d{3})(\d{4})">
-          <leadingDigits>5</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([4679]00)(\d)(\d{5})" nationalPrefixFormattingRule="$FG">
-          <leadingDigits>[4679]0</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(800)(\d{2,9})" nationalPrefixFormattingRule="$FG">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [2-79]\d{7,8}|
-          800\d{2,9}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,12}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            [2-4679][2-8]\d|
-            600[25]
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-        <exampleNumber>22345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>5[056]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>501234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          400\d{6}|
-          800\d{2,9}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,12}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[02]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>900234567</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>700[05]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>700012345</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Afghanistan -->
-    <!-- http://www.itu.int/oth/T0202000001/en -->
-    <territory id="AF" countryCode="93" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([2-7]\d)(\d{3})(\d{4})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-7]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            [25][0-8]|
-            [34][0-4]|
-            6[0-5]
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>234567890</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[057-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>701234567</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Antigua and Barbuda -->
-    <!-- http://www.itu.int/oth/T0202000008/en -->
-    <territory id="AG" countryCode="1" leadingDigits="268"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[289]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- 268 468 is not in the plan, but has been added after numbers with this prefix have been
-             found in online searches. -->
-        <nationalNumberPattern>
-          268(?:
-            4(?:
-              6[0-38]|
-              84
-            )|
-            56[0-2]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>2684601234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- 268 776/778/779 are not in the plan, but have been added after numbers with these
-             prefixes have been found in online searches. Same for 268 780/782/784/786. -->
-        <nationalNumberPattern>
-          268(?:
-            464|
-            7(?:
-              2[0-9]|
-              64|
-              7[0-689]|
-              8[02-68]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>2684641234</exampleNumber>
-      </mobile>
-      <pager>
-        <nationalNumberPattern>26840[69]\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>2684061234</exampleNumber>
-      </pager>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-      <voip>
-        <!-- This is included as Centrex in the plan. -->
-        <nationalNumberPattern>26848[01]\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>2684801234</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Anguilla -->
-    <!-- http://www.itu.int/oth/T0202000007/en -->
-    <territory id="AI" countryCode="1" leadingDigits="264"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[289]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2644(?:
-            6[12]|
-            9[78]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>2644612345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          264(?:
-            235|
-            476|
-            5(?:
-              3[6-9]|
-              8[1-4]
-            )|
-            7(?:
-              29|
-              72
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>2642351234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Albania -->
-    <!-- http://www.itu.int/oth/T0202000002/en -->
-    <territory id="AL" countryCode="355" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- Formats mostly follow http://tirana.usembassy.gov/list_of_doctors.html -->
-        <numberFormat pattern="(4)(\d{3})(\d{4})">
-          <leadingDigits>4[0-6]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(6[6-9])(\d{3})(\d{4})">
-          <leadingDigits>6</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{3})">
-          <leadingDigits>
-            [2358][2-5]|
-            4[7-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3,5})">
-          <leadingDigits>
-            [235][16-9]|
-            8[016-9]|
-            [79]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [2-57]\d{7}|
-          6\d{8}|
-          8\d{5,7}|
-          9\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              [168][1-9]|
-              [247]\d|
-              9[1-7]
-            )|
-            3(?:
-              1[1-3]|
-              [2-6]\d|
-              [79][1-8]|
-              8[1-9]
-            )|
-            4\d{2}|
-            5(?:
-              1[1-4]|
-              [2-578]\d|
-              6[1-5]|
-              9[1-7]
-            )|
-            8(?:
-              [19][1-5]|
-              [2-6]\d|
-              [78][1-7]
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,8}</possibleNumberPattern>
-        <exampleNumber>22345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>6[6-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>661234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>8001234</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <!-- It is named "Shared Revenue Services" in the plan, but as there is a separate "Shared
-             Cost Services", it is highly likely these numbers are premium rate numbers. No
-             information/example is found in the Internet. -->
-        <nationalNumberPattern>900\d{3}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-        <exampleNumber>900123</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>808\d{3}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-        <exampleNumber>808123</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>700\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>70012345</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Armenia -->
-    <!-- http://www.itu.int/oth/T020200000A/en -->
-    <!-- We think the national dialling prefix is 0 - it seems this was a change in 2005 (or 2008)
-         along with the new city codes. However, their official document makes no mention of it,
-         websites disagree, and we are not sure if the change has actually been made. -->
-    <territory id="AM" countryCode="374" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{6})">
-          <leadingDigits>
-            [17]|
-            9[1-469]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{5})">
-          <leadingDigits>[23]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{3})"
-          nationalPrefixFormattingRule="$NP $FG">
-          <leadingDigits>
-            8|
-            90
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-37-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            10\d|
-            2(?:
-              2[2-46]|
-              3[1-8]|
-              4[2-69]|
-              5[2-7]|
-              6[1-9]|
-              8[1-7]
-            )|
-            3[12]2
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>10123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            77|
-            9[1-469]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>77123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90[016]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90012345</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>80[1-4]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80112345</exampleNumber>
-      </sharedCost>
-      <shortCode>
-        <nationalNumberPattern>
-          8[1-7]\d{2}|
-          1\d{2}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,4}</possibleNumberPattern>
-        <exampleNumber>8711</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Netherlands Antilles -->
-    <!-- http://www.itu.int/oth/T0202000097/en -->
-    <territory id="AN" countryCode="599" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <leadingDigits>[13-7]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(9)(\d{3})(\d{4})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[13-79]\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            318|
-            5(?:
-              25|
-              4\d|
-              8[239]
-            )|
-            7(?:
-              1[578]|
-              50
-            )|
-            9(?:
-              [48]\d{2}|
-              50\d|
-              7(?:
-                2[0-2]|
-                [34]\d|
-                6[35-7]|
-                77
-              )
-            )
-          )\d{4}|
-          416[0239]\d{3}
-        </nationalNumberPattern>
-        <exampleNumber>7151234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            318|
-            5(?:
-              1[01]|
-              2[0-7]|
-              5\d|
-              8[016-8]
-            )|
-            7(?:
-              0[01]|
-              [89]\d
-            )|
-            9(?:
-              5(?:
-                [1246]\d|
-                3[01]
-              )|
-              6(?:
-                [1679]\d|
-                3[01]
-              )
-            )
-          )\d{4}|
-          416[15-8]\d{3}
-        </nationalNumberPattern>
-        <exampleNumber>3181234</exampleNumber>
-      </mobile>
-      <!-- Value-added services are lumped together under shared cost, since we are not sure exactly
-           what they are. -->
-      <sharedCost>
-        <nationalNumberPattern>
-          (?:
-            10|
-            69
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>1011234</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Angola -->
-    <!-- http://www.itu.int/oth/T0202000006/en -->
-    <territory id="AO" countryCode="244" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[29]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2\d(?:
-            [26-9]\d|
-            \d[26-9]
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>222123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Expanded the 92 prefix possibilities to match numbers found online. -->
-        <nationalNumberPattern>9[1-3]\d{7}</nationalNumberPattern>
-        <exampleNumber>923123456</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Argentina -->
-    <!-- http://www.itu.int/oth/T0202000009/en -->
-    <!-- http://www.cnc.gov.ar/numeracion/IndicativosInterurbanos.asp -->
-    <territory id="AR" countryCode="54" internationalPrefix="00"
-               nationalPrefix="0"  nationalPrefixForParsing="0(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1-367])|3(?:[06]2|1[467]|2[02-6]|3[13-8]|[49][2-6]|5[2-8]|7)|47[3-578]|6(?:1|2[2-7]|4[6-8]?|5[125-8])|9(?:0[1-3]|[19]|2\d|3[1-6]|4[0-24-68]|5[2-4]|6[2-6]|72?|8[23]?))|3(?:3(?:2[79]|8[2578])|4(?:0[124-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6\d|7[126]|8[237-9]|9[1-36-8])|5(?:1|2[1245]|3[2-4]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|7(?:1[15-8]|2[125]|3[1245]|4[13]|5[124-8]|7[2-57]|8[1-36])|8(?:1|2[125-7]|3[23578]|4[13-6]|5[4-8]?|6[1-357-9]|7[5-8]?|8[4-7]?|9[124])))15)?"
-               nationalPrefixTransformRule="9$1" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([68]\d{2})(\d{3})(\d{4})">
-          <leadingDigits>[68]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="([68]\d{2})(\d{3})(\d{4})">
-          <leadingDigits>[68]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="9(11)(\d{4})(\d{4})">
-          <leadingDigits>91</leadingDigits>
-          <format>$1 15-$2-$3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="9(11)(\d{4})(\d{4})">
-          <leadingDigits>91</leadingDigits>
-          <format>9 $1 $2-$3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="9(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            9(?:
-              2[2369]|
-              3[458]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            9(?:
-              2(?:
-                2[013]|
-                37|
-                6[14]|
-                9[179]
-              )|
-              3(?:
-                4[1235]|
-                5[138]|
-                8[1578]
-              )
-            )
-          </leadingDigits>
-          <format>$1 15-$2-$3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="9(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            9(?:
-              2[2369]|
-              3[458]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            9(?:
-              2(?:
-                2[013]|
-                37|
-                6[14]|
-                9[179]
-              )|
-              3(?:
-                4[1235]|
-                5[138]|
-                8[1578]
-              )
-            )
-          </leadingDigits>
-          <format>9 $1 $2-$3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="9(\d{4})(\d{2})(\d{4})">
-          <leadingDigits>
-            9(?:
-              2[2-469]|
-              3[3-578]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            9(?:
-              2(?:
-                2[24-9]|
-                3[0-69]|
-                47|
-                6[25]|
-                9[02-68]
-              )|
-              3(?:
-                3[28]|
-                4[046-9]|
-                5[2467]|
-                7[1-578]|
-                8[23469]
-              )
-            )
-          </leadingDigits>
-          <format>$1 15-$2-$3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="9(\d{4})(\d{2})(\d{4})">
-          <leadingDigits>
-            9(?:
-              2[2-469]|
-              3[3-578]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            9(?:
-              2(?:
-                2[24-9]|
-                3[0-69]|
-                47|
-                6[25]|
-                9[02-68]
-              )|
-              3(?:
-                3[28]|
-                4[046-9]|
-                5[2467]|
-                7[1-578]|
-                8[23469]
-              )
-            )
-          </leadingDigits>
-          <format>9 $1 $2-$3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(11)(\d{4})(\d{4})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2-$3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(11)(\d{4})(\d{4})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2-$3</format>
-        </intlNumberFormat>
-        <!-- Some 4-digit area codes actually are caught by this rule. I'm giving however preference
-             to the 3-digit area codes, since they are considerably larger communities. -->
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            2(?:
-              2[013]|
-              37|
-              6[14]|
-              9[179]
-            )|
-            3(?:
-              4[1235]|
-              5[138]|
-              8[1578]
-            )
-          </leadingDigits>
-          <format>$1 $2-$3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            2(?:
-              2[013]|
-              37|
-              6[14]|
-              9[179]
-            )|
-            3(?:
-              4[1235]|
-              5[138]|
-              8[1578]
-            )
-          </leadingDigits>
-          <format>$1 $2-$3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(\d{4})(\d{2})(\d{4})">
-          <leadingDigits>[23]</leadingDigits>
-          <format>$1 $2-$3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{4})(\d{2})(\d{4})">
-          <leadingDigits>[23]</leadingDigits>
-        <format>$1 $2-$3</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{9,11}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,12}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[1-9]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-        <exampleNumber>1123456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          9(?:
-            11[2-9]\d{7}|
-            (?:
-              2(?:
-                2[013]|
-                37|
-                6[14]|
-                9[179]
-              )|
-              3(?:
-                4[1235]|
-                5[138]|
-                8[1578]
-              )
-            )[2-9]\d{6}|
-            \d{4}[2-9]\d{5}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,12}</possibleNumberPattern>
-        <exampleNumber>91123456789</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8012345678</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          6(?:
-            0\d|
-            10
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>6001234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- American Samoa -->
-    <!-- http://www.itu.int/oth/T0202000004/en -->
-    <territory id="AS" countryCode="1" leadingDigits="684"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[689]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          6846(?:
-            22|
-            33|
-            44|
-            55|
-            77|
-            88|
-            9[19]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>6846221234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          684(?:
-            733|
-            258
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>6847331234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Austria -->
-    <!-- http://www.rtr.at/en/tk/E129 -->
-    <territory id="AT" countryCode="43" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([15])(\d{3,12})">
-          <leadingDigits>
-            1|
-            5[079]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3,10})">
-          <leadingDigits>
-            316|
-            46|
-            51|
-            732|
-            6(?:
-              44|
-              5[0-3579]|
-              [6-9]
-            )|
-            7(?:
-              1|
-              [28]0
-            )|
-            [89]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{4})(\d{3,9})">
-          <leadingDigits>
-            2|
-            3(?:
-              1[1-578]|
-              [3-8]
-            )|
-            4[2378]|
-            5[2-6]|
-            6(?:
-              [12]|
-              4[1-35-9]|
-              5[468]
-            )|
-            7(?:
-              2[1-8]|
-              35|
-              4[1-8]|
-              [57-9]
-            )
-          </leadingDigits>
-            <format>$1 $2</format>
-          </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{4,13}</nationalNumberPattern>
-        <possibleNumberPattern>\d{3,13}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Note the 050, 057 and 059 prefixes are defined as "private network" in the Austrian
-             plan. This just means they are registered to companies who are distributed over
-             different geographical areas and maintain their own network. Examples here:
-             http://www.rtr.at/?id=4506&S=05&art=d Also note that the full area code is not
-             validated - just the first 3 digits. This also means that even though for most
-             Austrian numbers the minimum length is 7, we allow 6 since we don't differentiate below
-             between 3 and 4 digit area codes for reasons of efficiency. -->
-        <nationalNumberPattern>
-          1\d{3,12}|
-          (?:
-            2(?:
-              1[467]|
-              2[134-8]|
-              5[2357]|
-              6[1-46-8]|
-              7[1-8]|
-              8[124-7]|
-              8[1458]
-            )|
-            3(?:
-              1[1-8]|
-              3[23568]|
-              4[5-7]|
-              5[1378]|
-              6[1-38]|
-              8[3-68]
-            )|
-            4(?:
-              2[1-8]|
-              35|
-              63|
-              7[1368]|
-              8[2457]
-            )|
-            5(?:
-              1[27]|
-              2[1-8]|
-              3[357]|
-              4[147]|
-              5[12578]|
-              6[37]
-            )|
-            6(?:
-              13|
-              2[1-47]|
-              4[1-35-8]|
-              5[468]|
-              62
-            )|
-            7(?:
-              2[1-8]|
-              3[25]|
-              4[13478]|
-              5[68]|
-              6[16-8]|
-              7[1-6]|
-              9[45]
-            )
-          )\d{3,10}|
-          5(?:
-            0[1-9]|
-            [79]\d
-          )\d{2,10}|
-          720\d{6,10}
-        </nationalNumberPattern>
-        <exampleNumber>1234567890</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          6(?:
-            44|
-            5[0-3579]|
-            6[013-9]|
-            [7-9]\d
-          )\d{4,10}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,13}</possibleNumberPattern>
-        <exampleNumber>644123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80[02]\d{6,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,13}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          (?:
-            711|
-            9(?:
-              0[01]|
-              3[019]
-            )
-          )\d{6,10}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9,13}</possibleNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>
-          8(?:
-            10|
-            2[018]
-          )\d{6,10}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9,13}</possibleNumberPattern>
-        <exampleNumber>810123456</exampleNumber>
-      </sharedCost>
-      <voip>
-        <nationalNumberPattern>780\d{6,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,13}</possibleNumberPattern>
-        <exampleNumber>780123456</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Australia -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T020200000D0001MSWE.doc -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Australia -->
-    <territory id="AU" countryCode="61" preferredInternationalPrefix="0011"
-               internationalPrefix="(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]"
-               nationalPrefix="0">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="($NP$FG)"
-          pattern="([2378])(\d{4})(\d{4})">
-          <leadingDigits>[2378]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(4\d{2})(\d{3})(\d{3})">
-          <leadingDigits>4</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(5[05]0)(\d{3})(\d{3})">
-          <leadingDigits>5</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="(1[389]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>
-            1(?:
-              [38]0|
-              9
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              [38]00|
-              9
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Although the national plan doesn't explicitly say so, there is no evidence that a 180
-             xxxx number could be 180 0xxx. -->
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="(180)(\d{4})">
-          <leadingDigits>180</leadingDigits>
-          <leadingDigits>180[1-9]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="(13)(\d{2})(\d{2})">
-          <leadingDigits>13[1-9]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-578]\d{5,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[2378]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-        <exampleNumber>212345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>4[0-68]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>412345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- Local-rate (SmartNumbers) are put here for now because they are also a reverse-charge
-             network, although they charge a small local call connect fee (around 25c). These start
-             with 13 or 1300. -->
-        <nationalNumberPattern>
-          1(?:
-            80(?:
-              0\d{2}
-            )? |
-            3(?:
-              00\d{2}
-            )?
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-        <exampleNumber>1800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>190[0126]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1900123456</exampleNumber>
-      </premiumRate>
-      <!-- Wikipedia was the source for these types of numbers, and number allocation search here
-           http://web.acma.gov.au/numb/openAccess/inquiry/allocationSearch.do confirms this. (Search
-           from 0500000000 to 0590000000) -->
-      <personalNumber>
-        <nationalNumberPattern>500\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>500123456</exampleNumber>
-      </personalNumber>
-      <voip>
-        <nationalNumberPattern>550\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>550123456</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Aruba -->
-    <!-- http://www.itu.int/oth/T020200000B/en -->
-    <territory id="AW" countryCode="297" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([5-9]\d{2})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[5-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          5(?:
-            2\d{2}|
-            8(?:
-              [2-7]\d|
-              8[0-79]|
-              9[48]
-            )
-          )\d{3}
-        </nationalNumberPattern>
-        <exampleNumber>5212345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding 660 since SMS messages have been successfully delivered to numbers with this
-             prefix, and numbers can be found in the yellow pages. -->
-        <nationalNumberPattern>
-          (?:
-            5[69]\d|
-            660|
-            9(?:
-              6\d|
-              9[02-9]
-            )|
-            7[34]\d
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>5601234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{4}</nationalNumberPattern>
-        <exampleNumber>8001234</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{4}</nationalNumberPattern>
-        <exampleNumber>9001234</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Azerbaijan -->
-    <!-- http://www.itu.int/oth/T020200000F/en -->
-    <territory id="AZ" countryCode="994" internationalPrefix="00"
-        nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>1[28]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>22</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2,3})(\d{2})(\d{2})">
-          <leadingDigits>3</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d)(\d{2})(\d{2})">
-          <leadingDigits>
-            1[013-79]|
-            2[013-9]
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})"
-          nationalPrefixFormattingRule="$NP$FG">
-          <leadingDigits>[4-8]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-8]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Added the 164 area code after it was found in other online lists and in many online
-             numbers. -->
-        <nationalNumberPattern>
-          (?:
-            1(?:
-              (?:
-                [28]\d|
-                9
-              )\d|
-              02|
-              1[0-589]|
-              3[358]|
-              4[013-79]|
-              5[0-479]|
-              6[02346-9]|
-              7[0-24-8]
-            )|
-            2(?:
-              16|
-              2\d|
-              3[0-24]|
-              4[1468]|
-              55|
-              6[56]|
-              79
-            )|
-            365?\d
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>123123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            4[04]|
-            5[015]|
-            60|
-            7[07]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>401234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>88\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>881234567</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Bosnia and Herzegovina -->
-    <!-- http://www.cra.ba/en/telecom/numbering/ -->
-    <!-- http://en.wikipedia.org/wiki/+387 -->
-    <territory id="BA" countryCode="387" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([3-689]\d)(\d{3})(\d{3})">
-          <format>$1 $2-$3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[3-689]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            [35]\d|
-            49
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>30123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>6[1-356]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>61123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>8[08]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>9[0246]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <!-- Using this category to model national tariff numbers - these are under Shared Cost in
-             the plan. -->
-        <nationalNumberPattern>82\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>82123456</exampleNumber>
-      </sharedCost>
-      <uan>
-        <nationalNumberPattern>81\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>81123456</exampleNumber>
-      </uan>
-    </territory>
-
-    <!-- Barbados -->
-    <!-- http://www.itu.int/oth/T0202000013/en -->
-    <territory id="BB" countryCode="1" leadingDigits="246"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[289]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>246[2-9]\d{6}</nationalNumberPattern>
-        <exampleNumber>2462345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          246(?:
-            (?:
-              2[346]|
-              45|
-              82
-            )\d|
-            25[0-4]
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>2462501234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Bangladesh -->
-    <!-- http://www.itu.int/oth/T0202000012/en -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Bangladesh -->
-    <!-- http://www.btrc.gov.bd/engineering/national_numbering_plan_2005.pdf -->
-    <territory id="BD" countryCode="880" internationalPrefix="00[12]?"
-               preferredInternationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(2)(\d{7})">
-          <leadingDigits>2</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{4,6})">
-          <leadingDigits>[3-79]1</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3,7})">
-          <leadingDigits>
-            [3-79][2-9]|
-            8
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{4})(\d{6})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-      <!-- This is quite complex so we can define that numbers beginning with 88 are not part of the
-           plan, so the country code can be accurately stripped off. -->
-        <nationalNumberPattern>
-          [2-79]\d{5,9}|
-          1\d{9}|
-          8[0-7]\d{4,8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- There was a plan to move to 10 digit fixed-line numbers, but this does not seem to have
-             been realised, judging by online numbers and wikipedia. These patterns are grouped
-             first by leading digit, then within by number of digits. Several Dhaka prefixes (02
-             731, 751 etc) are included despite not being mentioned on the wikipedia page due to
-             online evidence. Another oddity is Chittagong - some numbers have a leading 2, others
-             do not - both are allowed for now. -->
-             <nationalNumberPattern>
-               2(?:
-                 7\d1|
-                 8(?:
-                   [026]1|
-                   [1379][1-5]|
-                   8[1-8]
-                 )|
-                 9(?:
-                   0[0-2]|
-                   1[1-4]|
-                   3[3-5]|
-                   5[56]|
-                   6[67]|
-                   71|
-                   8[078]
-                 )
-               )\d{4}|
-               3(?:
-                 [6-8]1|
-                 (?:
-                   0[23]|
-                   [25][12]|
-                   82|
-                   416
-                 )\d|
-                 (?:
-                   31|
-                   12?[5-7]
-                 )\d{2}
-               )\d{3}|
-               4(?:
-                 (?:
-                   02|
-                   [49]6|
-                   [68]1
-                 )|
-                 (?:
-                   0[13]|
-                   21\d? |
-                   [23]2|
-                   [457][12]|
-                   6[28]
-                 )\d|
-                 (?:
-                   23|
-                   [39]1
-                 )\d{2}|
-                 1\d{3}
-               )\d{3}|
-               5(?:
-                 (?:
-                   [457-9]1|
-                   62
-                 )|
-                 (?:
-                   1\d? |
-                   2[12]|
-                   3[1-3]|
-                   52
-                 )\d|
-                 61{2}
-               )|
-               6(?:
-                 [45]1|
-                 (?:
-                   11|
-                   2[15]|
-                   [39]1
-                 )\d|
-                 (?:
-                   [06-8]1|
-                   62
-                 )\d{2}
-               )|
-               7(?:
-                 (?:
-                   32|
-                   91
-                 )|
-                 (?:
-                   02|
-                   31|
-                   [67][12]
-                 )\d|
-                 [458]1\d{2}|
-                 21\d{3}
-               )\d{3}|
-               8(?:
-                 (?:
-                   4[12]|
-                   [5-7]2|
-                   1\d?
-                 )|
-                 (?:
-                   0|
-                   3[12]|
-                   [5-7]1|
-                   217
-                 )\d
-               )\d{4}|
-               9(?:
-                 [35]1|
-                 (?:
-                   [024]2|
-                   81
-                 )\d|
-                 (?:
-                   1|
-                   [24]1
-                 )\d{2}
-               )\d{3}
-             </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>27111234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Presuming that mobile numbers with the prefixes 66, 37, 44 and 38 must be followed by
-             numbers [02-9] or they would clash with fixed-line codes. According to the plan, mobile
-             numbers should be moving to 1[13-9] anyway. -->
-        <nationalNumberPattern>
-          (?:
-            1[13-9]\d|
-            (?:
-              3[78]|
-              44
-            )[02-9]|
-            6(?:
-              44|
-              6[02-9]
-            )
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1812345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- Note: Including Tele-voting numbers here as they are free of charge. -->
-        <nationalNumberPattern>80[03]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Belgium -->
-    <!-- http://www.bipt.be/en/161/ShowContent/502/Database/Databases.aspx -->
-    <!-- http://www.telefoonzones.be/ -->
-    <!-- Information on non-geographic numbers here: (Dutch)
-         http://www.scarletbusiness.be/business/largeenterprise/nl/products/voiceservices/servicenumbers.jsp
-         -->
-    <territory id="BE" countryCode="32" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(4[7-9]\d)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>4[7-9]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="([2-49])(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>
-            [23]|
-            [49][23]
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="([15-8]\d)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>
-            [156]|
-            7[0178]|
-            8(?:
-              0[1-9]|
-              [1-79]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="([89]\d{2})(\d{2})(\d{3})">
-          <leadingDigits>
-            (?:
-              80|
-              9
-            )0
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Note that 80 is a valid area code, so we explicitly check for this case that the third
-             digit begins with 1-9 -->
-        <nationalNumberPattern>
-          (?:
-            1[0-69]|
-            [23][2-8]|
-            [49][23]|
-            5\d|
-            6[013-57-9]|
-            7[18]
-          )\d{6}|
-          8(?:
-            0[1-9]|
-            [1-69]\d
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>12345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          4(?:
-            7\d|
-            8[4-9]|
-            9[1-9]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>470123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          (?:
-            90|
-            7[07]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>87\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>87123456</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Burkina Faso -->
-    <!-- http://www.itu.int/oth/T0202000021/en -->
-    <territory id="BF" countryCode="226" internationalPrefix="00">
-      <availableFormats>
-        <!-- The national numbering plan from ITU suggests grouping of 2, 2 and 4, but we have
-             chosen to use the standard from numbers found on the internet instead. -->
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2457]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- 50 48 and 50 49 exist as well. -->
-        <nationalNumberPattern>
-          (?:
-            20(?:
-              49|
-              5[23]|
-              9[016-9]
-            )|
-            40(?:
-              4[569]|
-              55|
-              7[0179]
-            )|
-            50[34]\d
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>20491234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Including the whole range of 75 despite the document restricting it to only a few,
-             since even the Zain help-line is outside the range that the document specifies. -->
-        <nationalNumberPattern>
-          7(?:
-            [024-6]\d|
-            1[0-489]|
-            3[0124]|
-            7[01]|
-            8[013-9]|
-            9[0-4]
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>70123456</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Bulgaria -->
-    <!-- http://www.itu.int/oth/T0202000020/en -->
-    <territory id="BG" countryCode="359" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(2)(\d{3})(\d{3,4})">
-          <leadingDigits>2</leadingDigits>
-          <format>$1/$2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <leadingDigits>
-            43[124-7]|
-            70[1-9]
-          </leadingDigits>
-          <format>$1/$2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{2})">
-          <leadingDigits>
-            43[124-7]|
-            70[1-9]
-          </leadingDigits>
-          <format>$1/$2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{3})">
-          <leadingDigits>[78]00</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{2,3})">
-          <leadingDigits>
-            [356]|
-            7[1-9]|
-            8[1-6]|
-            9[1-7]
-          </leadingDigits>
-          <format>$1/$2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{3,4})">
-          <leadingDigits>
-            48|
-            8[7-9]|
-            9[08]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-9]\d{6,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2\d|
-            [36]\d|
-            5[1-9]|
-            8[1-6]|
-            9[1-7]
-          )\d{5,6}|
-          (?:
-            4(?:
-              [124-7]\d|
-              3[1-6]
-            )|
-            7(?:
-              0[1-9]|
-              [1-9]\d
-            )
-          )\d{4,5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>2123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            8[7-9]|
-            98
-          )\d{7}|
-          4(?:
-            3[0789]|
-            8\d
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-        <exampleNumber>48123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <nationalNumberPattern>700\d{5}</nationalNumberPattern>
-        <exampleNumber>70012345</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Bahrain -->
-    <!-- http://www.itu.int/oth/T0202000011/en -->
-    <!-- http://www.tra.org.bh/en/pdf/National_Numbering_Plan_2.pdf -->
-    <territory id="BH" countryCode="973" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{4})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[136-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <!-- Universal Service numbers are under both Mobile and Fixed-Line, as they can be assigned
-           to either. -->
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1(?:
-              3[3-6]|
-              6[0156]|
-              7\d
-            )|
-            6(?:
-              1[16]|
-              6[03469]|
-              9[69]
-            )|
-            77\d
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>17001234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            3(?:
-              [369]\d|
-              77|
-              8[38]
-            )|
-            6(?:
-              1[16]|
-              6[03469]|
-              9[69]
-            )|
-            77\d
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>36001234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{6}</nationalNumberPattern>
-        <exampleNumber>80123456</exampleNumber>
-      </tollFree>
-      <!-- 87 numbers are "wholly paid by the caller", so they are slotted under premium-rate for
-           now. -->
-      <premiumRate>
-        <nationalNumberPattern>
-          (?:
-            87|
-            9[014578]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>84\d{6}</nationalNumberPattern>
-        <exampleNumber>84123456</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Burundi -->
-    <!-- http://www.itu.int/oth/T0202000022/en -->
-    <territory id="BI" countryCode="257" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat
-          pattern="([27]\d)(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[27]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          22(?:
-            2[0-7]|
-            [3-5]0
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>22201234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Extra online mobile number prefixes found: 79 10, 78 \d{2} and 76 [29]\d. The 29
-             prefix is listed as a mobile prefix, but many people list it as their fixed home
-             number. We will keep it as mobile for now, but it may actually be a prefix for fixed
-             satellite phones. -->
-        <nationalNumberPattern>
-          (?:
-            29\d|
-            7(?:
-              1[1-3]|
-              [4-9]\d
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>79561234</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Benin -->
-    <!-- http://www.itu.int/oth/T0202000017/en -->
-    <territory id="BJ" countryCode="229" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <!-- Numbers beginning with 7 should be formatted as a block. -->
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [2689]\d{7}|
-          7\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- These come from the national numbering plan, but have been widened to include other
-             prefixes found in the yellow pages - specifically 21 0. -->
-        <nationalNumberPattern>
-          2(?:
-            02|
-            1[037]|
-            2[45]|
-            3[68]
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>20211234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- 93 0, 93 4, 93 5 and 93 8 have been added as many online examples of these prefixes can
-             be found. 9[68] and 97[23] prefixes have also been added because of online numbers
-             following these patterns and numbers where SMSs were successfully delivered. 66 has
-             been also added, as it seems to be a prefix for Mobile MTN. -->
-        <nationalNumberPattern>
-          66\d{6}|
-          9(?:
-            0[069]|
-            [35][0-2457-9]|
-            [6-8]\d
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90011234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>7[3-5]\d{2}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4}</possibleNumberPattern>
-        <exampleNumber>7312</exampleNumber>
-      </tollFree>
-      <!-- Other numbers beginning with 81 are reserved for _either_ free phone or shared-cost, but
-           there is no clear differentiation between these. -->
-      <voip>
-        <nationalNumberPattern>857[58]\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>85751234</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Saint Barthélemy, French Antilles -->
-    <!-- There seems to be some overlap with phone numbers from Saint Martin and Guadeloupe. The
-         national numbering plan does not specify any St Barthélemy-specific numbering prefixes, but
-         it appears from searches in online white and yellow pages that a subset of the prefixes
-         available in Guadeloupe are used. In these cases, if getRegionCodeForNumber is used, one of
-         these region codes will be returned, although numbers will be valid for both regions. -->
-    <!-- http://www.itu.int/oth/T0202000058/en -->
-    <territory id="BL" countryCode="590" internationalPrefix="00"
-      nationalPrefix="0">
-      <!-- Formatting rules borrowed from Guadeloupe. -->
-      <generalDesc>
-        <nationalNumberPattern>[56]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          590(?:
-            2[7-9]|
-            5[12]|
-            87
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>590271234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          690(?:
-            10|
-            2[27]|
-            66|
-            77|
-            8[78]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>690221234</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Bermuda -->
-    <!-- http://www.itu.int/oth/T0202000018/en -->
-    <territory id="BM" countryCode="1" leadingDigits="441"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[489]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          441(?:
-            2(?:
-              02|
-              23|
-              61|
-              [3479]\d
-            )|
-            [46]\d{2}|
-            5(?:
-              4\d|
-              60|
-              89
-            )|
-            824
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>4412345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          441(?:
-            [37]\d|
-            5[0-39]
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>4413701234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Brunei Darussalam -->
-    <!-- http://www.itu.int/oth/T020200001F/en -->
-    <territory id="BN" countryCode="673" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <!-- Format is from http://aiti.gov.bn/contact.html -->
-      <availableFormats>
-        <numberFormat pattern="([2-578]\d{2})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-578]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[2-5]\d{6}</nationalNumberPattern>
-        <exampleNumber>2345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[78]\d{6}</nationalNumberPattern>
-        <exampleNumber>7123456</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Bolivia -->
-    <!-- http://www.itu.int/oth/T020200001A/en -->
-    <!-- http://www.bolivia.com/Servicios/Plandenumeracion.pdf -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T020200001A0001MSWE.doc -->
-    <territory id="BO" countryCode="591"
-               internationalPrefix="00(1\d)?"
-               nationalPrefix="0"
-               nationalPrefixForParsing="0(1\d)?"
-               carrierCodeFormattingRule="$NP$CC $FG">
-      <availableFormats>
-        <numberFormat pattern="([234])(\d{7})">
-          <leadingDigits>[234]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([67]\d{7})">
-          <leadingDigits>[67]</leadingDigits>
-          <format>$1</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[23467]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              2\d{2}|
-              5(?:11|[258]\d|9[67])|
-              6(?:12|2\d|9[34])|
-              8(?:2[34]|39|62)
-            )|
-            3(?:
-              3\d{2}|
-              4(?:6\d|8[24])|
-              8(?:25|42|5[257]|86|9[25])|
-              9(?:2\d|3[234]|4[248]|5[24]|6[2-6]|7\d)
-            )|
-            4(?:
-              4\d{2}|
-              6(?:11|[24689]\d|72)
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>22123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[67]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>71234567</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Brazil -->
-    <!-- http://en.wikipedia.org/wiki/%2B55 -->
-    <territory id="BR" countryCode="55"
-               internationalPrefix="00(?:1[45]|2[135]|[34]1|43)"
-               nationalPrefix="0"
-               nationalPrefixForParsing="0(?:(1[245]|2[135]|[34]1)(\d{10}))?"
-               nationalPrefixTransformRule="$2">
-      <!--The national prefix for parsing here also contains a capturing group for the main number,
-           since the carrier codes here may also be area codes, so we want to check the length of
-           the number after capturing. We also need a nationalTransformRule to repopulate with the
-           number without the carrier code. -->
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="($FG)"
-          pattern="(\d{2})(\d{4})(\d{4})"
-          carrierCodeFormattingRule="$NP $CC ($FG)">
-          <leadingDigits>[1-9][1-9]</leadingDigits>
-          <format>$1 $2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="([34]00\d)(\d{4})">
-          <leadingDigits>[34]00</leadingDigits>
-          <leadingDigits>
-            400|
-            3003
-          </leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="([3589]00)(\d{2,3})(\d{4})">
-          <leadingDigits>[3589]00</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            [14689][1-9]|
-            2[12478]|
-            3[1-578]|
-            5[13-5]|
-            7[13-579]
-          )[2-5]\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>1123456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            [14689][1-9]|
-            2[12478]|
-            3[1-578]|
-            5[13-5]|
-            7[13-579]
-          )[6-9]\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1161234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6,7}</nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>[359]00\d{6,7}</nationalNumberPattern>
-        <exampleNumber>300123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>
-          (?:
-            400\d|
-            3003
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>40041234</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Bahamas -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000100001MSWE.pdf -->
-    <territory id="BS" countryCode="1" leadingDigits="242"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[289]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          242(?:
-            3(?:
-              02|
-              [236][1-9]|
-              4[0-24-9]|
-              5[0-68]|
-              7[3467]|
-              8[0-4]|
-              9[2-467]
-            )|
-            461|
-            502|
-            6(?:
-              12|
-              7[67]|
-              8[78]|
-              9[89]
-            )|
-            702
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>2423456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          242(?:
-            3(?:
-              5[79]|
-              [79]5
-            )|
-            4(?:
-              [2-4][1-9]|
-              5[1-8]|
-              6[2-8]|
-              7\d|
-              81
-            )|
-            5(?:
-              2[34]|
-              3[35]|
-              44|
-              5[1-9]|
-              65|
-              77
-            )|
-            6[34]6|
-            727
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>2423591234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- 242 300 is a Domestic Toll Free service. -->
-        <nationalNumberPattern>
-          242300\d{4}|
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Bhutan -->
-    <!-- http://www.itu.int/oth/T0202000019/en -->
-    <territory id="BT" countryCode="975" internationalPrefix="00">
-      <availableFormats>
-        <!-- Format is from
-             http://www.tourism.gov.bt/tour-operators/bhutan-abbot-tours-and-travels.html -->
-        <numberFormat pattern="(17)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="([2-8])(\d{3})(\d{3})">
-          <leadingDigits>[2-8]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          (?:
-            17|
-            [2-8]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2[3-6]|
-            [34][5-7]|
-            5[236]|
-            6[2-46]|
-            7[246]|
-            8[2-4]
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,7}</possibleNumberPattern>
-        <exampleNumber>2345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>17\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>17123456</exampleNumber>
-      </mobile>
-      <!-- No information on other types of phone numbers for Bhutan has been found. -->
-    </territory>
-
-    <!-- Botswana -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T020200001C0001MSWE.doc -->
-    <territory id="BW" countryCode="267" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(7[1-4])(\d{3})(\d{3})">
-          <leadingDigits>7</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(90)(\d{5})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-9]\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              4[0-48]|
-              6[0-24]|
-              9[0578]
-            )|
-            3(?:
-              1[0235-9]|
-              55|
-              6\d|
-              7[01]|
-              9[0-57]
-            )|
-            4(?:
-              6[03]|
-              7[1267]|
-              9[0-5]
-            )|
-            5(?:
-              3[0389]|
-              4[0489]|
-              7[1-47]|
-              88|
-              9[0-49]
-            )|
-            6(?:
-              2[1-35]|
-              5[149]|
-              8[067]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>2401234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          7(?:
-            [1-3]\d{6}|
-            4[0-7]\d{5}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>71123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>8\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>8123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>9012345</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Belarus -->
-    <!-- http://eng.beltelecom.by/info/numbering/ -->
-    <!-- Information on national prefix provided by a Belarussian person. -->
-    <territory id="BY" countryCode="375" internationalPrefix="8~10"
-               nationalPrefixForParsing="80?" nationalPrefix="8">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="$NP 0$FG"
-          pattern="([1-4]\d)(\d{3})(\d{4})">
-          <leadingDigits>[1-4]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP $FG"
-          pattern="([89]\d{2})(\d{3})(\d{4})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [12-4]\d{8}|
-          [89]\d{9}
-        </nationalNumberPattern>
-        <!-- Numbers are often written without the city code. -->
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1(?:
-              5(?:
-                1[1-5]|
-                2\d|
-                6[1-4]|
-                9[1-7]
-              )|
-              6(?:
-                [235]\d|
-                4[1-7]
-              )|
-              7\d{2}
-            )|
-            2(?:
-              1(?:
-                [246]\d|
-                3[0-35-9]|
-                5[1-9]
-              )|
-              2(?:
-                [235]\d|
-                4[0-8]
-              )|
-              3(?:
-                2\d|
-                3[02-79]|
-                4[024-7]|
-                5[0-7]
-              )
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-        <!-- Using test number for Grodno from the plan. -->
-        <exampleNumber>152450911</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              5[679]|
-              9[1-9]
-            )|
-            33\d|
-            44\d
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <!-- Using test number for BelCel from the plan. -->
-        <exampleNumber>294911911</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- Putting Interactive Polling Service (free) here too. -->
-        <nationalNumberPattern>80[13]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8011234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>902\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9021234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Belize -->
-    <!-- http://www.itu.int/oth/T0202000016/en -->
-    <!-- The trunk prefix, formally 0, was dropped in the last reorganisation of the numbering plan.
-         -->
-    <territory id="BZ" countryCode="501" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <leadingDigits>[2-8]</leadingDigits>
-          <!-- Adding hyphen following the Belize Telemedia formatting rules. -->
-          <format>$1-$2</format>
-        </numberFormat>
-        <numberFormat pattern="(0)(800)(\d{4})(\d{3})">
-          <leadingDigits>0</leadingDigits>
-          <format>$1-$2-$3-$4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [2-8]\d{6}|
-          0\d{10}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}(?:\d{4})?</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[234578][02]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>2221234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          6(?:
-            [01]\d|
-            2[0-5]|
-            [67][01])\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>6221234</exampleNumber>
-      </mobile>
-      <!-- We don't know how these would be dialled internationally - it is possible that they can't
-           be dialled internationally at all - so we represent the leading 0 as part of the number.
-           Information from www.belizetelemedia.net. -->
-      <tollFree>
-        <nationalNumberPattern>0800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>08001234123</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Canada -->
-    <!-- http://www.cnac.ca/canadian_dial_plan/canadian_dial_plan.htm -->
-    <territory id="CA" countryCode="1" internationalPrefix="011"
-      nationalPrefix="1">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>
-          [2-9]\d{9}|
-          3\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              04|
-              26|
-              50|
-              89
-            )|
-            3(?:
-              06|
-              43
-            )|
-            4(?:
-              03|
-              1[68]|
-              38|
-              5[06]
-            )|
-            5(?:
-              0[06]|
-              1[49]|
-              79|
-              8[17]
-            )|
-            6(?:
-              0[04]|
-              13|
-              47
-            )|
-            7(?:
-              0[059]|
-              [18]0|
-              78
-            )|
-            8(?:
-              [06]7|
-              19|
-            )|
-            90[25]
-          )[2-9]\d{6}|
-          310\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>2042345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              04|
-              26|
-              50|
-              89
-            )|
-            3(?:
-              06|
-              43
-            )|
-            4(?:
-              03|
-              1[68]|
-              38|
-              5[06]
-            )|
-            5(?:
-              0[06]|
-              1[49]|
-              79|
-              8[17]
-            )|
-            6(?:
-              0[04]|
-              13|
-              47
-            )|
-            7(?:
-              0[059]|
-              [18]0|
-              78
-            )|
-            8(?:
-              [06]7|
-              19|
-            )|
-            90[25]
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>2042345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}|
-          310\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Congo, Dem. Rep. of the (formerly Zaire) -->
-    <!-- http://www.itu.int/oth/T0202000037/en -->
-    <territory id="CD" countryCode="243" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([89]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([1-6]\d)(\d{5})">
-          <leadingDigits>[1-6]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [89]\d{8}|
-          [1-6]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[1-6]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>1234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            8[0-2489]|
-            9[7-9]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>991234567</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Central African Republic -->
-    <!-- http://www.itu.int/oth/T0202000028/en -->
-    <territory id="CF" countryCode="236" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[278]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>2[12]\d{6}</nationalNumberPattern>
-        <exampleNumber>21612345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[0257]\d{6}</nationalNumberPattern>
-        <exampleNumber>70012345</exampleNumber>
-      </mobile>
-      <premiumRate>
-        <nationalNumberPattern>8776\d{4}</nationalNumberPattern>
-        <exampleNumber>87761234</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Congo (Rep. of the) (Brazzaville) -->
-    <!-- http://www.itu.int/oth/T020200002E/en -->
-    <territory id="CG" countryCode="242" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
-          <leadingDigits>[02]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{4})(\d{4})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[028]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>222[1-589]\d{5}</nationalNumberPattern>
-        <exampleNumber>222123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>0[14-6]\d{7}</nationalNumberPattern>
-        <exampleNumber>061234567</exampleNumber>
-      </mobile>
-      <!-- Referred to as a "Green number" in the telephone plan. -->
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Switzerland -->
-    <!-- http://www.bakom.admin.ch/themen/telekom/00479/00604/index.html?lang=en
-         under Technical prescriptions: Numbering plan for international carriers -->
-    <territory id="CH" countryCode="41" internationalPrefix="00"
-               nationalPrefix="0"  nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([2-9]\d)(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>
-            [2-7]|
-            [89]1
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="([89]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>
-            8[047]|
-            90
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2[12467]|
-            3[1-4]|
-            4[134]|
-            5[12568]|
-            6[12]|
-            [7-9]1
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>212345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[46-9]\d{7}</nationalNumberPattern>
-        <exampleNumber>741234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90[016]\d{6}</nationalNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>84[0248]\d{6}</nationalNumberPattern>
-        <exampleNumber>840123456</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>878\d{6}</nationalNumberPattern>
-        <exampleNumber>878123456</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Côte d'Ivoire -->
-    <!-- http://www.itu.int/oth/T0202000031/en -->
-    <territory id="CI" countryCode="225" internationalPrefix="00">
-      <availableFormats>
-        <!-- Using format from online yellow pages over format implied in national numbering plan.
-             -->
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[02-5]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              0[023]|
-              1[02357]|
-              [23][045]|
-              4[03-5]
-            )|
-            3(?:
-              0[06]|
-              1[069]|
-              [2-4][07]|
-              5[09]|
-              6[08]
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>21234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Added the prefix 40 because SMS messages have been successfully delivered. Supported by
-             numbers found on the internet. -->
-        <nationalNumberPattern>
-          (?:
-            0[1-9]|
-            4[04-9]|
-            50|
-            6[067]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>01234567</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Cook Islands -->
-    <territory id="CK" countryCode="682" internationalPrefix="00"
-               nationalPrefix="00">
-    </territory>
-
-    <!-- Chile -->
-    <!-- http://www.itu.int/oth/T020200002A/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B56 -->
-    <!-- Carriers listed here: http://www.turismochile.com/datos/carrier.php -->
-    <territory id="CL" countryCode="56"
-      internationalPrefix="(?:0|1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))0"
-      nationalPrefix="0"
-      nationalPrefixForParsing="0|(1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))"
-      nationalPrefixFormattingRule="$NP$FG">
-      <!-- When dialling mobile numbers from landlines, or vice versa, you need a prefix of 0, which
-      we strip here. National destinations may be dialled with a carrier if they are not local so
-      we extract these carrier codes as well. -->
-      <availableFormats>
-        <numberFormat pattern="(2)(\d{3})(\d{4})"
-          nationalPrefixFormattingRule="($FG)"
-          carrierCodeFormattingRule="$CC ($FG)">
-          <leadingDigits>2</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2,3})(\d{4})"
-          nationalPrefixFormattingRule="($FG)"
-          carrierCodeFormattingRule="$CC ($FG)">
-          <leadingDigits>
-            [357]|
-            4[1-35]|
-            6[13-57]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(9)([6-9]\d{3})(\d{4})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(44)(\d{3})(\d{4})">
-          <leadingDigits>44</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="([68]00)(\d{3})(\d{3,4})">
-          <leadingDigits>
-            60|
-            8
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="(600)(\d{3})(\d{2})(\d{3})">
-          <leadingDigits>60</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="(1230)(\d{3})(\d{4})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          (?:
-            [2-9]|
-            600|
-            123
-          )\d{7,8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2|
-            32|
-            41
-          )\d{7}|
-          (?:
-            3[3-5]|
-            4[235]|
-            5[1-3578]|
-            6[13-57]|
-            7[1-35]
-          )\d{6,7}
-        </nationalNumberPattern>
-        <!-- Area codes do not need to be dialled when dialling within the same area, so the
-             smallest possible number is length 6. -->
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>21234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>9[6-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-        <exampleNumber>961234567</exampleNumber>
-      </mobile>
-      <!-- Toll free and premium rate patterns have been collected by looking at numbers on the
-           internet, rather than from a definitive source. -->
-      <tollFree>
-        <!-- 1230 numbers are used by Visa/Mastercard helplines in Chile -->
-        <nationalNumberPattern>
-          800\d{6}|
-          1230\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9,11}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>600\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-        <exampleNumber>6001234567</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>44\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>441234567</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Cameroon -->
-    <!-- http://www.itu.int/oth/T0202000024/en -->
-    <territory id="CM" countryCode="237" internationalPrefix="00">
-      <availableFormats>
-        <!-- Formatting on the internet is consistently with the first 2 extracted, and usually in
-             the same format as France (all 2 digit groups) so we use this instead of the guidance
-             of the national numbering plan (which has 1 3 2 2 and 4 4 as its two formatting
-             examples.) -->
-        <numberFormat pattern="([237-9]\d)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>
-            [2379]|
-            88
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(800)(\d{2})(\d{3})">
-          <leadingDigits>80</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[237-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Technically, the numbers are required only to start with a 2 or a 3, but all numbers at
-             the moment start with 22 or 33 since they have been migrated from seven digit numbers
-             beginning with these numbers. This rule should be relaxed if/when we start getting
-             numbers beginning in other ways. -->
-        <nationalNumberPattern>
-          (?:
-            22|
-            33
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>22123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[79]\d{7}</nationalNumberPattern>
-        <exampleNumber>71234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <!-- These numbers are listed as value-added in the guide, and in practice seem to begin
-             with 88 (usually 880). No information can be found as to whether these are premium rate
-             or shared cost. -->
-        <nationalNumberPattern>88\d{6}</nationalNumberPattern>
-        <exampleNumber>88012345</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- China -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T020200002B0001XLSE.xls -->
-    <territory id="CN" countryCode="86" internationalPrefix="00"
-               nationalPrefix="0">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(80\d{2})(\d{4})">
-          <leadingDigits>80[2678]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([48]00)(\d{3})(\d{4})">
-          <leadingDigits>[48]00</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Local numbers -->
-        <!-- Chinese fixed-line numbers can be dialed from a cell phone without area code and they
-             can be 7 to 8 digits. This rule is here to make formatting work with such numbers, as
-             people frequently store them in their cellphones. It has to stay before formatting
-             rules for fixed-line numbers to make AsYouTypeFormatter work with these numbers. The
-             leadingDigits prefix makes sure it doesn't clash with mobile numbers. -->
-        <numberFormat pattern="(\d{3,4})(\d{4})">
-          <leadingDigits>[2-9]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(21)(\d{4})(\d{4,6})">
-          <leadingDigits>21</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="([12]\d)(\d{4})(\d{4})">
-          <leadingDigits>
-            10[1-9]|
-            2[02-9]
-          </leadingDigits>
-          <!-- Note the leadingDigitsPattern for 4 digits is the same as 3 digits, -->
-          <leadingDigits>
-            10[1-9]|
-            2[02-9]
-          </leadingDigits>
-          <leadingDigits>
-            10(?:
-              [1-79]|
-              8(?:
-                [1-9]|
-                0[1-9]
-              )
-            )|
-            2[02-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(\d{3})(\d{4})(\d{4})">
-          <leadingDigits>
-            3(?:
-              11|
-              7[159]
-            )|
-            4[135]1|
-            5(?:
-              1|
-              2[37]|
-              3[12]|
-              7[13-79]|
-              9[15]
-            )|
-            7(?:
-              31|
-              5[457]|
-              6[09]
-            )|
-            898
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            3(?:
-              1[02-9]|
-              35|
-              49|
-              5|
-              7[02-68]|
-              9[1-68]
-            )|
-            4(?:
-              1[02-9]|
-              2[179]|
-              [35][2-9]|
-              6[4789]|
-              7[0-46-9]|
-              8[23]
-            )|
-            5(?:
-              3[03-9]|
-              4[36]|
-              5|
-              6[1-6]|
-              7[028]|
-              80|
-              9[2-46-9]
-            )|
-            6(?:
-              3[1-5]|
-              6[0238]|
-              9[12]
-            )|
-            7(?:
-              01|
-              [1579]|
-              2[248]|
-              3[04-9]|
-              4[3-6]|
-              6[2368]
-            )|
-            8(?:
-              1[236-8]|
-              2[5-7]|
-              [37]|
-              5[1-9]|
-              8[3678]|
-              9[1-7]
-            )|
-            9(?:
-              0[1-3689]|
-              1[1-79]|
-              [379]|
-              4[13]|
-              5[1-5]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(1[3-58]\d)(\d{4})(\d{4})">
-          <leadingDigits>1[3-58]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(10800)(\d{3})(\d{4})">
-          <leadingDigits>108</leadingDigits>
-          <leadingDigits>1080</leadingDigits>
-          <leadingDigits>10800</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(21)(\d{4})(\d{4,6})">
-          <leadingDigits>21</leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="([12]\d)(\d{4})(\d{4})">
-          <leadingDigits>
-            10[1-9]|
-            2[02-9]
-          </leadingDigits>
-          <!-- Note the leadingDigitsPattern for 4 digits is the same as 3 digits, -->
-          <leadingDigits>
-            10[1-9]|
-            2[02-9]
-          </leadingDigits>
-          <leadingDigits>
-            10(?:
-              [1-79]|
-              8(?:
-                [1-9]|
-                0[1-9]
-              )
-            )|
-            2[02-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(80\d{2})(\d{4})">
-          <leadingDigits>80[2678]</leadingDigits>
-          <format>$1 $2</format>
-        </intlNumberFormat>
-        <intlNumberFormat
-          pattern="(\d{3})(\d{4})(\d{4})">
-          <leadingDigits>
-            3(?:
-              11|
-              7[159]
-            )|
-            4[135]1|
-            5(?:
-              1|
-              2[37]|
-              3[12]|
-              7[13-79]|
-              9[15]
-            )|
-            7(?:
-              31|
-              5[457]|
-              6[09]
-            )|
-            898
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <intlNumberFormat
-          pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            3(?:
-              1[02-9]|
-              35|
-              49|
-              5|
-              7[02-68]|
-              9[1-68]
-            )|
-            4(?:
-              1[02-9]|
-              2[179]|
-              [35][2-9]|
-              6[4789]|
-              7[0-46-9]|
-              8[23]
-            )|
-            5(?:
-              3[03-9]|
-              4[36]|
-              5|
-              6[1-6]|
-              7[028]|
-              80|
-              9[2-46-9]
-            )|
-            6(?:
-              3[1-5]|
-              6[0238]|
-              9[12]
-            )|
-            7(?:
-              01|
-              [1579]|
-              2[248]|
-              3[04-9]|
-              4[3-6]|
-              6[2368]
-            )|
-            8(?:
-              1[236-8]|
-              2[5-7]|
-              [37]|
-              5[1-9]|
-              8[3678]|
-              9[1-7]
-            )|
-            9(?:
-              0[1-3689]|
-              1[1-79]|
-              [379]|
-              4[13]|
-              5[1-5]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(1[3-58]\d)(\d{4})(\d{4})">
-          <leadingDigits>1[3-58]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="([48]00)(\d{3})(\d{4})">
-          <leadingDigits>[48]00</leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(10800)(\d{3})(\d{4})">
-          <leadingDigits>108</leadingDigits>
-          <leadingDigits>1080</leadingDigits>
-          <leadingDigits>10800</leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [1-79]\d{7,11}|
-          8[0-357-9]\d{6,9}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,12}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          21\d{8,10}|
-          (?:
-            10|
-            2[02-57-9]|
-            3(?:
-              11|
-              7[159]
-            )|
-            4[135]1|
-            5(?:
-              1\d|
-              2[37]|
-              3[12]|
-              7[13-79]|
-              9[15]
-            )|
-            7(?:
-              31|
-              5[457]|
-              6[09]
-            )|
-            898
-          )\d{8}|
-          (?:
-            3(?:
-              1[02-9]|
-              35|
-              49|
-              5\d|
-              7[02-68]|
-              9[1-68]
-            )|
-            4(?:
-              1[02-9]|
-              2[179]|
-              [35][2-9]|
-              6[4789]|
-              7[0-46-9]|
-              8[23]
-            )|
-            5(?:
-              3[03-9]|
-              4[36]|
-              5\d|
-              6[1-6]|
-              7[028]|
-              80|
-              9[2-46-9]
-            )|
-            6(?:
-              3[1-5]|
-              6[0238]|
-              9[12]
-            )|
-            7(?:
-              01|
-              [1579]\d|
-              2[248]|
-              3[04-9]|
-              4[3-6]|
-              6[2368]
-            )|
-            8(?:
-              1[236-8]|
-              2[5-7]|
-              [37]\d|
-              5[1-9]|
-              8[3678]|
-              9[1-7]
-            )|
-            9(?:
-              0[1-3689]|
-              1[1-79]|
-              [379]\d|
-              4[13]|
-              5[1-5]
-            )
-          )\d{7}|
-          80(?:
-            29|
-            6[03578]|
-            7[018]|
-            81
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>1012345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          1(?:
-            3[0-9]|
-            47|
-            5[0135689]|
-            8[05-9]
-          )\d{8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>13123456789</exampleNumber>
-      </mobile>
-      <!-- Toll free, premium rate, and VoIP numbers are not clearly defined in the official Chinese
-           number plan, and do not seem to have been standardized. The information below is
-           collected from searching the web. -->
-      <!-- http://en.wikipedia.org/wiki/Toll-free_telephone_number -->
-      <tollFree>
-        <nationalNumberPattern>
-          (?:
-            10
-          )?800\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10,12}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>16[08]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>16812345</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>400\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>4001234567</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Colombia -->
-    <!-- http://www.itu.int/oth/T020200002C/en
-         http://en.wikipedia.org/wiki/Telephone_numbers_in_Colombia -->
-    <territory id="CO" countryCode="57" internationalPrefix="00[579]|#555|#999"
-               nationalPrefix="0" nationalPrefixForParsing="0([3579]|4(?:44|56))">
-      <availableFormats>
-        <numberFormat pattern="(\d)(\d{7})" carrierCodeFormattingRule="$NP$CC $FG"
-          nationalPrefixFormattingRule="($FG)">
-          <leadingDigits>
-            1(?:
-              8[2-9]|
-              9[0-3]|
-              [2-7]
-            )|
-            [24-8]
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              8[2-9]|
-              9(?:
-                09|
-                [1-3]
-              )|
-              [2-7]
-            )|
-            [24-8]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d)(\d{7})">
-          <leadingDigits>
-            1(?:
-              8[2-9]|
-              9[0-3]|
-              [2-7]
-            )|
-            [24-8]
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              8[2-9]|
-              9(?:
-                09|
-                [1-3]
-              )|
-              [2-7]
-            )|
-            [24-8]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(\d{3})(\d{7})" carrierCodeFormattingRule="$NP$CC $FG">
-          <leadingDigits>3</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{3})(\d{7})">
-          <leadingDigits>3</leadingDigits>
-          <format>$1 $2</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(1)(\d{3})(\d{7})" nationalPrefixFormattingRule="$NP$FG">
-          <leadingDigits>
-            1(?:
-              80|
-              9[04]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              800|
-              9(?:
-                0[01]|
-                4[78]
-              )
-            )
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(1)(\d{3})(\d{7})">
-          <leadingDigits>
-            1(?:
-              80|
-              9[04]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              800|
-              9(?:
-                0[01]|
-                4[78]
-              )
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          (?:
-            [13]\d{0,3}|
-            [24-8]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[124-8][2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>12345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          3(?:
-            0[0-24]|
-            1[0-8]|
-            2[01]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>3211234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>1800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>18001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          19(?:
-            0[01]|
-            4[78]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>19001234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Costa Rica -->
-    <!-- http://www.itu.int/oth/T0202000030/en -->
-    <territory id="CR" countryCode="506" internationalPrefix="00"
-      nationalPrefixForParsing="(1900)" carrierCodeFormattingRule="$CC $FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{4})(\d{4})">
-          <leadingDigits>
-            [24]|
-            8[389]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>[89]0</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2489]\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>2[24-7]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>22123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>8[389]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>83123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <!-- Includes "mass calls" numbers with prefix 905. -->
-        <nationalNumberPattern>90[059]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9001234567</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>4000\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>40001234</exampleNumber>
-      </voip>
-      <shortCode>
-        <!-- This pattern excludes 4-digit SMS content numbers for now. -->
-        <nationalNumberPattern>
-          1(?:
-            02[2-469]|
-            1(?:
-              1[0235-9]|
-              2|
-              37|
-              46|
-              75|
-              8[79]|
-              9[0-379]
-            )|
-            212)
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,4}</possibleNumberPattern>
-        <exampleNumber>1022</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Cuba -->
-    <!-- www.itu.int/oth/T0202000033/en -->
-    <territory id="CU" countryCode="53" internationalPrefix="119"
-               nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)">
-      <availableFormats>
-        <numberFormat pattern="(\d)(\d{6,7})">
-          <leadingDigits>7</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{4,6})">
-          <leadingDigits>[2-4]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{7})" nationalPrefixFormattingRule="$NP$FG">
-          <leadingDigits>5</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-57]\d{5,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2[1-4]\d{5,6}|
-          3(?:
-            1\d{6}|
-            [23]\d{4,6})|
-          4(?:
-            [125]\d{5,6}|
-            [36]\d{6}|
-            [78]\d{4,6})|
-          7\d{6,7}
-        </nationalNumberPattern>
-        <exampleNumber>71234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>5\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>51234567</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Cape Verde -->
-    <!-- http://www.itu.int/oth/T0202000026/en -->
-    <territory id="CV" countryCode="238" internationalPrefix="0">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{2})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[259]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2(?:
-            2[1-7]|
-            3[0-8]|
-            4[12]|
-            5[1256]|
-            6\d|
-            7[1-3]|
-            8[1-5]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>2211234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- It seems, contrary to their numbering plan, the entire 9X range is used for mobile
-             phones. SMS messages has been successfully sent to numbers starting with 95 and 97 for
-             example, and there are plenty of numbers on the internet that start with these
-             prefixes. -->
-        <nationalNumberPattern>
-          (?:
-            9\d|
-            59
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>9911234</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Cyprus -->
-    <!-- http://www.itu.int/oth/T0202000034/en -->
-    <territory id="CY" countryCode="357" internationalPrefix="00">
-      <availableFormats>
-        <!-- Format from http://www.cyprusyellowpages.com/-->
-        <numberFormat pattern="([27-9]\d)(\d{6})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[27-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>2[2-6]\d{6}</nationalNumberPattern>
-        <exampleNumber>22345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Universal Access Service numbers (7777 xxxx) are included here, as they are classified
-             as Mobile in the Cyprus national numbering plan. -->
-        <nationalNumberPattern>
-          7777\d{4}|
-          9(?:
-            [69]\d|
-            7[67]
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>96123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>8000\d{4}</nationalNumberPattern>
-        <exampleNumber>80001234</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>9009\d{4}</nationalNumberPattern>
-        <exampleNumber>90091234</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <nationalNumberPattern>700\d{5}</nationalNumberPattern>
-        <exampleNumber>70012345</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Czech Rep. -->
-    <!-- http://www.itu.int/oth/T0202000035/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B420 -->
-    <territory id="CZ" countryCode="420" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([2-9]\d{2})(\d{3})(\d{3})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2\d{8}|
-          (?:
-            3[1257-9]|
-            4[16-9]|
-            5[13-9]
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>212345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          60[1-8]\d{6}|
-          7[2379]\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>601123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90[0689]\d{6}</nationalNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>8[134]\d{7}</nationalNumberPattern>
-        <exampleNumber>811234567</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>70[01]\d{6}</nationalNumberPattern>
-        <exampleNumber>700123456</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Germany -->
-    <!-- http://www.itu.int/oth/T0202000051/en -->
-    <territory id="DE" countryCode="49" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{4,11})">
-          <leadingDigits>
-            3[02]|
-            40|
-            [68]9
-          </leadingDigits>
-          <format>$1/$2</format>
-        </numberFormat>
-        <!-- The order of the rules on 3-5 digits area code matter as fallback is used here. -->
-        <!-- 3 digit area codes. -->
-        <numberFormat pattern="(\d{3})(\d{3,10})">
-          <leadingDigits>
-            2(?:
-              \d1|
-              0[2389]|
-              1[24]|
-              28|
-              34
-            )|
-            3(?:
-              [3-9][15]|
-              40
-            )|
-            [4-8][1-9]1|
-            9(?:
-              06|
-              [1-9]1
-            )
-          </leadingDigits>
-          <format>$1/$2</format>
-        </numberFormat>
-        <!-- 4 digit area codes. -->
-        <numberFormat pattern="(\d{4})(\d{2,8})">
-          <leadingDigits>
-            [24-6]|
-            [7-9](?:
-              \d[1-9]|
-              [1-9]\d
-            )|
-            3(?:
-              [3569][02-46-9]|
-              4[2-4679]|
-              7[2-467]|
-              8[2-46-8]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            [24-6]|
-            [7-9](?:
-              \d[1-9]|
-              [1-9]\d
-            )|
-            3(?:
-              3(?:
-                0[1-467]|
-                2[127-9]|
-                3[124578]|
-                [46][1246]|
-                7[1257-9]|
-                8[1256]|
-                9[145]
-              )|
-              4(?:
-                2[135]|
-                3[1357]|
-                4[13578]|
-                6[1246]|
-                7[1356]|
-                9[1346]
-              )|
-              5(?:
-                0[14]|
-                2[1-3589]|
-                3[1357]|
-                4[1246]|
-                6[1-4]|
-                7[1346]|
-                8[13568]|
-                9[1246]
-              )|
-              6(?:
-                0[356]|
-                2[1-489]|
-                3[124-6]|
-                4[1347]|
-                6[13]|
-                7[12579]|
-                8[1-356]|
-                9[135]
-              )|
-              7(?:
-                2[1-7]|
-                3[1357]|
-                4[145]|
-                6[1-5]|
-                7[1-4]
-              )|
-              8(?:
-                21|
-                3[1468]|
-                4[1347]|
-                6[0135-9]|
-                7[1467]|
-                8[136]
-              )|
-              9(?:
-                0[12479]|
-                2[1358]|
-                3[1357]|
-                4[134679]|
-                6[1-9]|
-                7[136]|
-                8[147]|
-                9[1468]
-              )
-            )
-          </leadingDigits>
-          <format>$1/$2</format>
-        </numberFormat>
-        <!-- 5 digit area codes. -->
-        <numberFormat pattern="(\d{5})(\d{1,6})">
-          <leadingDigits>3</leadingDigits>
-          <format>$1/$2</format>
-        </numberFormat>
-        <!-- http://www.t-mobile.de/servicehotlines/0,13401,17660-_,00.html -->
-        <numberFormat pattern="([18]\d{2})(\d{7,9})">
-          <leadingDigits>
-            1[5-7]|
-            800
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d)(\d{4,10})">
-          <leadingDigits>
-            (?:
-              18|
-              90
-            )0
-          </leadingDigits>
-          <leadingDigits>
-            180|
-            900[1359]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(700)(\d{4})(\d{4})">
-          <leadingDigits>700</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <!-- When deciding whether to assume a leading 49 is a country code or not, the number is
-             examined to see if it is valid with the 49 as part of the number. Due to the variable
-             length of German numbers, this test is hard to do. The national pattern is hence
-             stricter for numbers starting with 49, to try and remove the country code if the number
-             begins with 49 whenever possible. -->
-        <nationalNumberPattern>
-          [1-35-9]\d{3,13}|
-          4(?:
-            [0-8]\d{4,12}|
-            9(?:
-              4[1-8]|
-              [0-35-7]\d
-            )\d{2,7}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{2,14}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- The numbering plan defines rather optimistic longest-number limits - online numbers
-             don't seem to respect this. The max-length is hence extended. -->
-        <nationalNumberPattern>
-          [246]\d{5,13}|
-          3(?:
-            [03-9]\d{4,11}|
-            2\d{9}
-          )|
-          5(?:
-            0[2-8]|
-            [38][0-8]|
-            [124-6]\d|
-            [79][0-7]
-          )\d{3,10}|
-          7(?:
-            0[2-8]|
-            [1-9]\d
-          )\d{3,10}|
-          8(?:
-            0[2-9]|
-            [1-9]\d
-          )\d{3,10}|
-          9(?:
-            0[6-9]|
-            [1-9]\d
-          )\d{3,10}
-        </nationalNumberPattern>
-        <exampleNumber>30123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Note: 8 digit numbers seem to be available for prefix 176 now,
-        although no official documentation can be found, according to user
-        bug-reports. -->
-        <nationalNumberPattern>
-          1(?:
-            5\d{9}|
-            7(?:
-              [0-57-9]|
-              6\d
-            )\d{7}|
-            6(?:
-              [02]\d{7,8}|
-              3\d{7}
-            )
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-        <exampleNumber>15123456789</exampleNumber>
-      </mobile>
-      <pager>
-        <nationalNumberPattern>
-          16(?:
-            4\d{1,10}|
-            [89]\d{1,11}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,14}</possibleNumberPattern>
-        <exampleNumber>16412345</exampleNumber>
-      </pager>
-      <tollFree>
-        <nationalNumberPattern>800\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,12}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          900(?:
-            [135]\d{6}|
-            9\d{7}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-        <exampleNumber>9001234567</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <!-- See bug 1683119 for a discussion about maximum number lengths. -->
-        <nationalNumberPattern>180\d{5,11}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,14}</possibleNumberPattern>
-        <exampleNumber>18012345</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>700\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>70012345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Djibouti -->
-    <!-- http://www.itu.int/oth/T020200003A/en -->
-    <territory id="DJ" countryCode="253" internationalPrefix="00">
-      <availableFormats>
-        <!-- The number format here is suggested in the plan and used online,
-        although the phone numbers of the national numbering authority itself on
-        the plan do not follow this. -->
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-8]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Includes "Numéro long CDMA fixe" numbers starting with the digit 5. -->
-        <nationalNumberPattern>
-          (?:
-            1[05]|
-            [2-5]\d
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>251234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[6-8]\d{5}</nationalNumberPattern>
-        <exampleNumber>601234</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Denmark -->
-    <!-- http://en.itst.dk/telecom-internet-regulation/numbering-issues/numbering-lists -->
-    <territory id="DK" countryCode="45" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([1-9]\d)(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            3[2-9]|
-            4[3-9]|
-            5[4-9]|
-            6[2-9]|
-            7[02-9]|
-            8[26-9]|
-            9[6-9]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>32123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- There are some overlaps for some number prefixes - the plan says that they are 'mainly'
-             used for a certain type of number. -->
-        <nationalNumberPattern>
-          (?:
-            2[0-9]|
-            3[0-2]|
-            4[0-2]|
-            5[0-3]|
-            6[01]|
-            7[12]|
-            81|
-            99
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>20123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{6}</nationalNumberPattern>
-        <exampleNumber>80123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90\d{6}</nationalNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Dominica -->
-    <!-- http://www.itu.int/oth/T020200003B/en -->
-    <territory id="DM" countryCode="1" leadingDigits="767"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[7-9]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          767(?:
-            2(?:
-              55|
-              66
-            )|
-            4(?:
-              2[01]|
-              4[0-25-9]
-            )|
-            50[0-4]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>7674201234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          767(?:
-            2(?:
-              [2346]5|
-              7[5-7]
-            )|
-            31[5-7]|
-            61[4-6]
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7672251234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Dominican Rep. -->
-    <!-- http://www.itu.int/oth/T020200003C/en -->
-    <territory id="DO" countryCode="1" leadingDigits="8[024]9"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[89]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- We could be more detailed here, as the metadata contains information about some of the
-             mobile/fixed-line prefixes, but the data is incomplete, so we restrict ourselves to a
-             more generic rule for now. -->
-        <nationalNumberPattern>8[024]9[2-9]\d{6}</nationalNumberPattern>
-        <exampleNumber>8092345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>8[024]9[2-9]\d{6}</nationalNumberPattern>
-        <exampleNumber>8092345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Algeria -->
-    <!-- http://www.itu.int/oth/T0202000003/en -->
-    <!-- www.arpt.dz -->
-    <territory id="DZ" countryCode="213" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- Formatting from www.pagesjaunes-dz.com. -->
-        <numberFormat pattern="([1-4]\d)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[1-4]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="([5-8]\d{2})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[5-8]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(9\d)(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          (?:
-            [1-4]|
-            [5-9]\d
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- We include the VSAT lines here. -->
-        <nationalNumberPattern>
-          (?:
-            1\d|
-            2[014-79]|
-            3[0-8]|
-            4[0135689]
-          )\d{6}|
-          9619\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>12345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            5[56]|
-            6[69]|
-            7[79]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>551234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>80[3-689]1\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>808123456</exampleNumber>
-      </premiumRate>
-      <!-- The Algerian plan doesn't specify where the costs start to be considered "premium", so we
-           draw an arbitrary line here and say that from 50 Da up they will be considered premium.
-           -->
-      <sharedCost>
-        <nationalNumberPattern>80[12]1\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>801123456</exampleNumber>
-      </sharedCost>
-      <voip>
-        <nationalNumberPattern>98[23]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>983123456</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Ecuador -->
-    <!-- http://en.wikipedia.org/wiki/+593 -->
-    <!-- http://www.conatel.gov.ec -->
-    <!-- http://www.itu.int/oth/T020200003D/en -->
-    <!-- A new plan has been prepared, but no implementation date has yet been stated. -->
-    <territory id="EC" countryCode="593" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)">
-      <availableFormats>
-        <numberFormat pattern="(\d)(\d{3})(\d{4})">
-          <leadingDigits>[2-7]</leadingDigits>
-          <format>$1 $2-$3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d)(\d{3})(\d{4})">
-          <leadingDigits>[2-7]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{3})"
-          nationalPrefixFormattingRule="$NP$FG">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{2})(\d{3})(\d{3})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(1800)(\d{3})(\d{3,4})"
-          nationalPrefixFormattingRule="$FG">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(1800)(\d{3})(\d{3,4})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-9]\d{7}|1\d{9,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[2-7][2-7]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>22123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[89]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>99123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>1800\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-        <exampleNumber>18001234567</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Estonia -->
-    <!-- http://www.itu.int/oth/T0202000043/en -->
-    <!-- http://www.tja.ee/public/Legislation_side/Numbering_/Estonian_NP_eng.htm -->
-    <territory id="EE" countryCode="372" internationalPrefix="00">
-      <availableFormats>
-        <!-- When 7-digit 70 numbers are phased out, they should be removed from this formatting
-             pattern and only 7[1-9] left. -->
-        <numberFormat pattern="([34-79]\d{2})(\d{4})">
-          <leadingDigits>
-            [3679]|
-            4[3-8]|
-            5(?:
-              [0-2]|
-              5[0-478]|
-              6[45]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            [3679]|
-            4[3-8]|
-            5(?:
-              [02]|
-              1(?:
-                [0-8]|
-                95
-              )|
-              5[0-478]|
-              6(?:
-                4[0-4]|
-                5[1-589]
-              )
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(70)(\d{2})(\d{4})">
-          <leadingDigits>70</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(8000)(\d{3})(\d{3})">
-          <leadingDigits>800</leadingDigits>
-          <leadingDigits>8000</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([458]\d{3})(\d{3,4})">
-          <leadingDigits>
-            40|
-            5|
-            8(?:
-              00|
-              [1-5]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            40|
-            5|
-            8(?:
-              00[1-9]|
-              [1-5]
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [3-9]\d{6,7}|
-          800\d{6,7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <noInternationalDialling>
-        <nationalNumberPattern>800[2-9]\d{3}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>8002123</exampleNumber>
-      </noInternationalDialling>
-      <fixedLine>
-        <!-- Supporting eFax numbers here as well. -->
-        <nationalNumberPattern>
-          (?:
-            3[23589]|
-            4(?:
-              0\d|
-              [3-8]
-            )|
-            6\d|
-            7[1-9]|
-            88
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>3212345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- 7 digit mobile numbers currently in use with special prefixes are preserved - new
-             numbers are 8 digits. -->
-        <nationalNumberPattern>
-          (?:
-            5\d|
-            8[1-5]
-          )\d{6}|
-          5(?:
-            [02]\d{2}|
-            1(?:
-              [0-8]\d|
-              95
-            )|
-            5[0-478]\d|
-            64[0-4]|
-            65[1-589]
-          )\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>51234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          800(?:
-            0\d{3}|
-            1\d|
-            [2-9]
-          )\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>9001234</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- The third digit is optional until Jan 1st 2011, when numbers will have been changed to
-             the new 8 digit series. -->
-        <nationalNumberPattern>70[0-2]?\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>70012345</exampleNumber>
-      </personalNumber>
-      <shortCode>
-        <nationalNumberPattern>1[1-9]\d</nationalNumberPattern>
-        <possibleNumberPattern>\d{3}</possibleNumberPattern>
-        <exampleNumber>112</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Egypt -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T020200003E0001MSWE.doc -->
-    <territory id="EG" countryCode="20" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-       <availableFormats>
-         <!-- Note that no explicit formatting rule is here for 5-digit numbers starting with a 16
-              or 19. These are formatted without national prefix, as a block, so do not need to be
-              listed here. -->
-         <numberFormat pattern="(\d)(\d{7,8})">
-           <leadingDigits>[23]</leadingDigits>
-           <format>$1 $2</format>
-         </numberFormat>
-         <numberFormat pattern="(\d{2})(\d{7})">
-           <leadingDigits>
-             [14-6]|
-             [89][2-9]
-           </leadingDigits>
-           <format>$1 $2</format>
-         </numberFormat>
-         <numberFormat pattern="([89]00)(\d{3})(\d{4})">
-           <leadingDigits>[89]00</leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-       </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          1\d{4,9}|
-          [2-689]\d{7,9}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Short numbers used for businesses (starting with 16 or 19) are covered here. -->
-        <nationalNumberPattern>
-          (?:
-            1[35][23]|
-            2[23]\d|
-            3\d|
-            4(?:
-              0[2-4]|
-              [578][23]|
-              64
-            )|
-            5(?:
-              0[234]|
-              [57][23]
-            )|
-            6[24-689]3|
-            8(?:
-              [28][2-4]|
-              42|
-              6[23]
-            )|
-            9(?:
-              [25]2|
-              3[24]|
-              6[23]|
-              7[2-4]
-            )
-          )\d{6}|
-          1[69]\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-        <exampleNumber>234567890</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>1[0-246-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>101234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9001234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Eritrea -->
-    <!-- http://www.itu.int/oth/T0202000042/en -->
-    <territory id="ER" countryCode="291" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d)(\d{3})(\d{3})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[178]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          1(?:
-            1[12568]|
-            20|
-            40|
-            55|
-            6[146]
-          )\d{4}|
-          8\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>8370362</exampleNumber><!-- Test number from plan. -->
-      </fixedLine>
-      <mobile>
-        <!-- It is unclear in the plan whether the 07 mobile prefix superseded the previous 017[1-3]
-             numbers or was in addition to them, so we support both here. -->
-        <nationalNumberPattern>
-          17[1-3]\d{4}|
-          7\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>7123456</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Spain -->
-    <!-- http://www.mityc.es/telecomunicaciones/es-ES/Servicios/Numeracion/Paginas/Plan.aspx -->
-    <territory id="ES" countryCode="34" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([5-9]\d{2})(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[5-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[89][1-8]\d{7}</nationalNumberPattern>
-        <exampleNumber>812345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>6\d{8}</nationalNumberPattern>
-        <exampleNumber>612345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>[89]00\d{6}</nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>80[367]\d{6}</nationalNumberPattern>
-        <exampleNumber>803123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>90[12]\d{6}</nationalNumberPattern>
-        <exampleNumber>901123456</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>70\d{7}</nationalNumberPattern>
-        <exampleNumber>701234567</exampleNumber>
-      </personalNumber>
-      <!-- Modelling non-geographic nomadic numbers as UAN. -->
-      <uan>
-        <nationalNumberPattern>51\d{7}</nationalNumberPattern>
-        <exampleNumber>511234567</exampleNumber>
-      </uan>
-    </territory>
-
-    <!-- Ethiopia -->
-    <!-- http://www.itu.int/oth/T0202000044/en -->
-    <territory id="ET" countryCode="251" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([1-59]\d)(\d{3})(\d{4})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-59]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            11(?:
-              1(?:
-                1[124]|
-                2[2-57]|
-                3[1-5]|
-                5[5-8]|
-                8[6-8]
-              )|
-              2(?:
-                13|
-                3[6-8]|
-                5[89]|
-                7[05-9]|
-                8[2-6]
-              )|
-              3(?:
-                2[01]|
-                3[0-289]|
-                4[1289]|
-                7[1-4]|
-                87
-              )|
-              4(?:
-                1[69]|
-                3[2-49]|
-                4[0-23]|
-                6[5-8]
-              )|
-              5(?:
-                1[57]|
-                44|
-                5[0-4]
-              )|
-              6(?:
-                18|
-                2[69]|
-                4[5-7]|
-                5[1-5]|
-                6[0-59]|
-                8[015-8]
-              )
-            )|
-            2(?:
-              2(?:
-                11[1-9]|
-                22[0-7]|
-                33\d|
-                44[1467]|
-                66[1-68]
-              )|
-              5(?:
-                11[124-6]|
-                33[2-8]|
-                44[1467]|
-                55[14]|
-                66[1-3679]|
-                77[124-79]|
-                880
-              )
-            )|
-            3(?:
-              3(?:
-                11[0-46-8]|
-                22[0-6]|
-                33[0134689]|
-                44[04]|
-                55[0-6]|
-                66[01467]
-              )|
-              4(?:
-                44[0-8]|
-                55[0-69]|
-                66[0-3]|
-                77[1-5]
-              )
-            )|
-            4(?:
-              6(?:
-                22[0-24-7]|
-                33[1-5]|
-                44[13-69]|
-                55[14-689]|
-                660|
-                88[1-4]
-              )|
-              7(?:
-                11[1-9]|
-                22[1-9]|
-                33[13-7]|
-                44[13-6]|
-                55[1-689]
-              )
-            )|
-            5(?:
-              7(?:
-                227|
-                55[05]|
-                (?:
-                  66|
-                  77
-                )[14-8]
-              )|
-              8(?:
-                11[149]|
-                22[013-79]|
-                33[0-68]|
-                44[013-8]|
-                550|
-                66[1-5]|
-                77\d
-              )
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>111112345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Some additional area codes are permitted here in line with online numbers, namely 91
-             13[4-6], 91 17[2-6], 91 31\d, 91 43[2489]. -->
-        <nationalNumberPattern>
-          91(?:
-            1(?:
-              [146]\d|
-              2[0-5]|
-              3[4-6]|
-              50|
-              7[2-6]|
-              8[46-9]
-            )|
-            31\d|
-            4(?:
-              3[0-2489]|
-              7[0-3]
-            )|
-            5(?:
-              3[23]|
-              7[3-5]
-            )|
-            6(?:
-              58|
-              8[23]
-            )|
-            7(?:
-              5[57]|
-              8[01]
-            )|
-            8(?:
-              3[45]|
-              7[67]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>911123456</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Finland -->
-    <!-- http://www.ficora.fi/en/index/palvelut/palvelutaiheittain/numerointi/numerotyypitjaalueet.html -->
-    <territory id="FI" countryCode="358" internationalPrefix="00|99[049]"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{4,10})">
-          <leadingDigits>
-            2[09]|
-            [14]|
-            50|
-            7[135]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{4,11})">
-          <leadingDigits>
-            [25689][1-8]|
-            3
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([6-8]00)(\d{4,7})">
-          <leadingDigits>[6-8]0</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{4,11}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,12}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- This is limited to geographic numbers - non-geographic nationwide
-        subscriber numbers are listed under UAN. -->
-        <nationalNumberPattern>
-          1(?:
-            [35689][1-8]\d{3,9}|
-            [47]\d{5,10}
-          )|
-          2[1-8]\d{3,9}|
-          3(?:
-            [1-8]\d{3,9}|
-            9\d{4,8}
-          )|
-          [5689][1-8]\d{3,9}|
-        </nationalNumberPattern>
-        <exampleNumber>1312345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          4\d{5,10}|
-          50\d{4,8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,11}</possibleNumberPattern>
-        <exampleNumber>412345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{4,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>[67]00\d{5,6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-        <exampleNumber>600123456</exampleNumber>
-      </premiumRate>
-      <uan>
-        <nationalNumberPattern>
-          10[1-9]\d{3,7}|
-          2(?:
-            0(?:
-              [16-8]\d{3,7}|
-              2[14-9]\d{1,6}|
-              [3-5]\d{2,7}|
-              9[0-7]\d{1,6}
-            )|
-            9\d{4,8}
-          )|
-          30[1-9]\d{3,7}|
-          7(?:
-            1\d{7}|
-            3\d{8}|
-            5[03-9]\d{2,7}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-        <exampleNumber>10112345</exampleNumber>
-      </uan>
-    </territory>
-
-    <!-- Fiji -->
-    <territory id="FJ" countryCode="679" internationalPrefix="00">
-    </territory>
-
-    <!-- Falkland Islands (Malvinas) -->
-    <territory id="FK" countryCode="500" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Micronesia, Federated States of -->
-    <territory id="FM" countryCode="691" internationalPrefix="00">
-    </territory>
-
-    <!-- Faroe Islands -->
-    <!-- http://www.itu.int/oth/T0202000047/en -->
-    <territory id="FO" countryCode="298" internationalPrefix="00"
-        nationalPrefixForParsing="(10(?:01|[12]0|88))"
-        carrierCodeFormattingRule="$CC $FG">
-      <!-- All numbers are formatted together, as a block. -->
-      <numberFormat pattern="(\d{6})">
-        <format>$1</format>
-      </numberFormat>
-      <generalDesc>
-        <nationalNumberPattern>[2-9]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            20|
-            [3-4]\d|
-            8[19]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>201234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            2[1-9]|
-            5\d|
-            7[1-79]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>211234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80[257-9]\d{3}</nationalNumberPattern>
-        <exampleNumber>802123</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          90(?:
-            [1345][15-7]|
-            2[125-7]|
-            99
-            )\d{2}
-        </nationalNumberPattern>
-        <exampleNumber>901123</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>
-          (?:
-            6[0-36]|
-            88
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>601234</exampleNumber>
-      </voip>
-      <shortCode>
-        <!-- Includes special numbers, special services and universal services.  -->
-        <nationalNumberPattern>
-          1(?:
-            1[248]|
-            4[124]\d|
-            71\d|
-            8[7-9]\d
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,4}</possibleNumberPattern>
-        <exampleNumber>211234</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- France -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T020200004A0001MSWE.doc -->
-    <!-- http://www.arcep.fr/index.php?id=8146 -->
-    <!-- http://en.wikipedia.org/wiki/%2B33 -->
-    <territory id="FR" countryCode="33" internationalPrefix="[04579]0"
-      preferredInternationalPrefix="00"
-      nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([1-79])(\d{2})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[1-79]</leadingDigits>
-          <format>$1 $2 $3 $4 $5</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP $FG"
-          pattern="(8\d{2})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[1-5]\d{8}</nationalNumberPattern>
-        <exampleNumber>123456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          6\d{8}|
-          7[5-9]\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>612345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
-        <exampleNumber>801234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>89[1-37-9]\d{6}</nationalNumberPattern>
-        <exampleNumber>891123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>
-          8(?:
-            1[019]|
-            2[0156]|
-            84|
-            90
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>810123456</exampleNumber>
-      </sharedCost>
-      <voip>
-        <nationalNumberPattern>9\d{8}</nationalNumberPattern>
-        <exampleNumber>912345678</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Gabon -->
-    <!-- http://www.itu.int/oth/T020200004E/en -->
-    <territory id="GA" countryCode="241" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[4-9]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(0\d)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>0</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [4-9]\d{5}|
-          0\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            4(?:
-              [04-8]\d|
-              2[04]
-            )|
-            (?:
-              5[04-689]|
-              6[024-9]|
-              7\d|
-              8[236]|
-              9[02368]
-            )\d
-          )\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-        <exampleNumber>441234</exampleNumber>
-      </fixedLine>
-      <!-- The leading zero here is supposed to be temporary - at a later date,
-      Gabon intends to have a 0 as their national prefix for all numbers
-      instead. -->
-      <!-- http://www.wtng.info/wtng-241-ga.html was used as the basis for the acceptable prefixes,
-           with some supplementary prefixes added from internet research. There is supposedly a
-           resource on mobile prefixes on the Gabon Telecom website, but the site (www.ogooue.ga)
-           doesn't seem to work and no alternative can be found. Extra prefixes added: 07 12, 07 13,
-           06 71, 07 33, 07 [67]\d -->
-      <mobile>
-        <nationalNumberPattern>
-          0(?:
-            5(?:
-              0[89]|
-              3[0-4]|
-              8[0-26]|
-              9[238]
-            )|
-            6(?:
-              0[3-7]|
-              1[01]|
-              2[0-7]|
-              6[0-589]|
-              71|
-              83|
-              9[57]
-            )|
-            7(?:
-              1[2-5]|
-              2[89]|
-              3[35-9]|
-              4[01]|
-              5[0-347-9]|
-              [67]\d|
-              8[457-9]|
-              9[0146]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>06031234</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- United Kingdom -->
-    <!-- http://stakeholders.ofcom.org.uk/telecoms/numbering/ -->
-    <!-- http://en.wikipedia.org/wiki/List_of_United_Kingdom_dialling_codes -->
-    <!-- http://www.numberingplans.com/?page=dialling&sub=areacodes&ac=GB -->
-    <!-- Note that this excludes Isle of Man, Jersey and Guernsey prefixes for the purposes of
-         validation, although the formatting rules are shared. -->
-    <territory id="GB" countryCode="44" internationalPrefix="00"
-               nationalPrefix="0" preferredExtnPrefix=" x" nationalPrefixFormattingRule="$NP$FG"
-               mainCountryForCode="true">
-      <availableFormats>
-        <!-- 2d, 55, 56, 70, 76 with 10 digits. -->
-        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>
-            2|
-            5[56]|
-            7[06]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- 11d, 1d1, 3dd, 9dd with 10 digits. -->
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            1(?:
-              1|
-              \d1
-            )|
-            3|
-            9[018]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- 1dddd with 9 or 10 digits.
-             These area codes are very rare in GB, and are only available in the following places:
-             13873(Langholm), 15242(Hornby), 15394(Hawkshead), 15395(Grange-over-Sands),
-             15396(Sedbergh), 16973(Wigton), 16974(Raughton Head), 16977(Brampton),
-             17683(Appleby), 17684(Pooley Bridge), 17687(Keswick), 19467(Gosforth). -->
-        <numberFormat pattern="(\d{5})(\d{4,5})">
-          <leadingDigits>
-            1(?:
-              38|
-              5[23]|
-              69|
-              76|
-              94
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              387|
-              5(?:
-                24|
-                39
-              )|
-              697|
-              768|
-              946
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              3873|
-              5(?:
-                242|
-                39[456]
-              )|
-              697[347]|
-              768[347]|
-              9467
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- 1ddd with 9 or 10 digits. -->
-        <numberFormat pattern="(1\d{3})(\d{5,6})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- 7ddd (not 70, 76) with 10 digits. -->
-        <numberFormat pattern="(7\d{3})(\d{6})">
-          <leadingDigits>7[1-5789]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- 800 1111 : UK ChildLine. -->
-        <numberFormat pattern="(800)(\d{4})">
-          <leadingDigits>800</leadingDigits>
-          <leadingDigits>8001</leadingDigits>
-          <leadingDigits>80011</leadingDigits>
-          <leadingDigits>800111</leadingDigits>
-          <leadingDigits>8001111</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- 845 46 47 : UK NHS Direct. -->
-        <numberFormat pattern="(845)(46)(4\d)">
-          <leadingDigits>845</leadingDigits>
-          <leadingDigits>8454</leadingDigits>
-          <leadingDigits>84546</leadingDigits>
-          <leadingDigits>845464</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- 84d, 87d with 10 digits. -->
-        <numberFormat pattern="(8\d{2})(\d{3})(\d{4})">
-          <leadingDigits>
-            8(?:
-              4[2-5]|
-              7[0-3]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- 80d (including 800) with 10 digits. -->
-        <numberFormat pattern="(80\d)(\d{3})(\d{4})">
-          <leadingDigits>80</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- 500, 800 with 9 digits. -->
-        <numberFormat pattern="([58]00)(\d{6})">
-          <leadingDigits>[58]00</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{7,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
-      </generalDesc>
-      <areaCodeOptional>
-        <!-- These are a subset of the fixed-line rules, with digits 2-9 as the leading digit of the
-             subscriber number. There are patterns for 2+8, 3+7 and a combined pattern for all
-             4+6/4+5 and 5+5/5+4 numbers. Note that numbers matching this pattern are not
-             necessarily valid numbers. -->
-        <nationalNumberPattern>
-          2\d[2-9]\d{7}|
-          1(?:
-            1\d|
-            \d1
-          )[2-9]\d{6}|
-          1(?:
-            [248][02-9]\d[2-9]\d{4,5}|
-            (?:
-              3(?:
-                [02-79]\d|
-                8[0-69]
-              )|
-              5(?:
-                [04-9]\d|
-                2[0-35-9]|
-                3[0-8]
-              )|
-              6(?:
-                [02-8]\d|
-                9[0-689]
-              )|
-              7(?:
-                [02-5789]\d|
-                6[0-79]
-              )|
-              9(?:
-                [0235-9]\d|
-                4[0-5789]
-              )
-            )[2-9]\d{4,5}|
-            (?:
-              387(?:
-                3[2-9]|
-                [24-9]\d
-              )|
-              5(?:
-                24(?:
-                  2[2-9]|
-                  [3-9]\d
-                )|
-                39(?:
-                  [4-6][2-9]|
-                  [237-9]\d
-                )
-              )|
-              697(?:
-                [347][2-9]|
-                [25689]\d
-              )|
-              768(?:
-                [347][2-9]|
-                [25679]\d
-              )|
-              946(?:
-                7[2-9]|
-                [2-689]\d
-              )
-            )\d{3,4}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>1332456789</exampleNumber>
-      </areaCodeOptional>
-      <fixedLine>
-        <!-- http://en.wikipedia.org/wiki/List_of_United_Kingdom_dialling_codes -->
-        <!-- Pattern matches geographic NSN=10 numbers as follows:
-             - area code and local number first digit for 2+8,
-             - area code and local number first digit for 3+7,
-             - area code only for 4+6 (including areas with embedded 5+5).
-             Pattern matches geographic NSN=9 numbers as follows:
-             - area code and local number first two digits for 4+5,
-             - area code and local number first three digits for 4+5 special case (01768) 88Ddd,
-             - area code and local number first digit for 5+4 special case (016977) Dddd.
-             All patterns exclude ranges used in GG, IM, JE. -->
-        <nationalNumberPattern>
-          2(?:
-            0[01378]|
-            3[0189]|
-            4[017]|
-            8[0-46-9]|
-            9[012]
-          )\d{7}|
-          1(?:
-            (?:1
-              (?:3[0-48]|
-                 [46][0-4]|
-                 5[012789]|
-                 7[0-39]|
-                 8[01349]
-              )|
-              21[0-7]|
-              31[0-8]|
-              [459]1\d|
-              61[0-46-9]
-            )
-          )\d{6}|
-          1(?:
-            2(?:
-              0[024-9]|
-              2[3-9]|
-              3[3-79]|
-              4[1-689]|
-              [58][02-9]|
-              6[0-4789]|
-              7[013-9]|
-              9\d
-            )|
-            3(?:
-              0\d|
-              [25][02-9]|
-              3[02-579]|
-              [468][0-46-9]|
-              7[1235679]|
-              9[24578]
-            )|
-            4(?:
-              0[03-9]|
-              [28][02-5789]|
-              [37]\d|
-              4[02-69]|
-              5[0-8]|
-              [69][0-79]
-            )|
-            5(?:
-              0[1235-9]|
-              2[024-9]|
-              3[015689]|
-              4[02-9]|
-              5[03-9]|
-              6\d|
-              7[0-35-9]|
-              8[0-468]|
-              9[0-5789]
-            )|
-            6(?:
-              0[034689]|
-              2[0-35689]|
-              [38][013-9]|
-              4[1-467]|
-              5[0-69]|
-              6[13-9]|
-              7[0-8]|
-              9[0124578]
-            )|
-            7(?:
-              0[0246-9]|
-              2\d|
-              3[023678]|
-              4[03-9]|
-              5[0-46-9]|
-              6[013-9]|
-              7[0-35-9]|
-              8[024-9]|
-              9[02-9]
-            )|
-            8(?:
-              0[35-9]|
-              2[1-5789]|
-              3[02-578]|
-              4[0-578]|
-              5[124-9]|
-              6[2-69]|
-              7\d|
-              8[02-9]|
-              9[02569]
-            )|
-            9(?:
-              0[02-589]|
-              2[02-689]|
-              3[1-5789]|
-              4[2-9]|
-              5[0-579]|
-              6[234789]|
-              7[0124578]|
-              8\d|
-              9[2-57]
-            )
-          )\d{6}|
-          1(?:
-            2(?:
-              0(?:
-                46[1-4]|
-                87[2-9]
-              )|
-              545[1-79]|
-              76(?:
-                2\d|
-                3[1-8]|
-                6[1-6]
-              )|
-              9(?:
-                7(?:
-                  2[0-4]|
-                  3[2-5]
-                )|
-                8(?:
-                  2[2-8]|
-                  7[0-4789]|
-                  8[345]
-                )
-              )
-            )|
-            3(?:
-              638[2-5]|
-              647[23]|
-              8(?:
-                47[04-9]|
-                64[015789]
-              )
-            )|
-            4(?:
-              044[1-7]|
-              20(?:
-                2[23]|
-                8\d
-              )|
-              6(?:
-                0(?:
-                  30|
-                  5[2-57]|
-                  6[1-8]|
-                  7[2-8]
-                )|
-                140
-              )|
-              8(?:
-                052|
-                87[123]
-              )
-            )|
-            5(?:
-              24(?:
-                3[2-79]|
-                6\d
-              )|
-              276\d|
-              6(?:
-                26[06-9]|
-                686
-              )
-            )|
-            6(?:
-              06(?:
-                4\d|
-                7[4-79]
-              )|
-              295[567]|
-              35[34]\d|
-              47(?:
-                24|
-                61
-              )|
-              59(?:
-                5[08]|
-                6[67]|
-                74
-              )|
-              955[0-4]
-            )|
-            7(?:
-              26(?:
-                6[13-9]|
-                7[0-7]
-              )|
-              442\d|
-              50(?:
-                2[0-3]|
-                [3-68]2|
-                76
-              )
-            )|
-            8(?:
-              27[56]\d|
-              37(?:
-                5[2-5]|
-                8[239]
-              )|
-              84(?:
-                3[2-58]
-              )
-            )|
-            9(?:
-              0(?:
-                0(?:
-                  6[1-8]|
-                  85
-                )|
-                52\d
-              )|
-              3583|
-              4(?:
-                66[1-8]|
-                9(?:
-                  2[01]|
-                  81
-                )
-              )|
-              63(?:
-                23|
-                3[1-4]
-              )|
-              9561
-            )
-          )\d{3}|
-          176888[234678]\d{2}|
-          16977[23]\d{3}
-        </nationalNumberPattern>
-        <exampleNumber>1212345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- http://stakeholders.ofcom.org.uk/telecoms/numbering/telephone-no-availability/numbers-administered/
-             7100-7599, 7700-7999 with 10 digits; excluding ranges used in GG, IM, JE. -->
-        <nationalNumberPattern>
-          7(?:
-            [1-4]\d\d|
-            5(?:
-              0[0-8]|
-              [13-9]\d|
-              2[0-35-9]
-            )|
-            7(?:
-              0[1-9]|
-              [1-7]\d|
-              8[02-9]|
-              9[0-689]
-            )|
-            8(?:
-              [014-9]\d|
-              [23][0-8]
-            )|
-            9(?:
-              [04-9]\d|
-              1[02-9]|
-              2[0135-9]|
-              3[0-689]
-            )
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7400123456</exampleNumber>
-      </mobile>
-      <pager>
-        <!-- 76 with 10 digits; excluding ranges used in IM. -->
-        <nationalNumberPattern>
-          76(?:
-            0[012]|
-            2[356]|
-            4[0134]|
-            5[49]|
-            6[0-369]|
-            77|
-            81|
-            9[39]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7640123456</exampleNumber>
-      </pager>
-      <!-- Source for non geographic numbers:
-           http://en.wikipedia.org/wiki/Non-geographical_telephone_numbers_in_the_UK -->
-      <tollFree>
-        <!-- 800 1111 with 7 digits, 800 with 9 or 10 digits, 808 with 10 digits, 500 with 9 digits. -->
-        <nationalNumberPattern>
-          80(?:
-            0(?:
-              1111|
-              \d{6,7}
-            )|
-            8\d{7}
-          )|
-          500\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}(?:\d{2,3})?</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <!-- 871, 872, 873 with 10 digits are now Controlled Premium Rate Services, so are listed
-             here as well as 900-909, 910-919, 980-983 with 10 digits. -->
-        <nationalNumberPattern>
-          (?:
-            87[123]|
-            9(?:
-              [01]\d|
-              8[0-3]
-            )
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9012345678</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <!-- Using shared cost to deal with the various revenue sharing number prefixes in the
-             United Kingdom: 845 46 47 with 7 digits, 842-845, 870 with 10 digits. -->
-        <nationalNumberPattern>
-          8(?:
-            4(?:
-              5464\d|
-              [2-5]\d{7}
-            )|
-            70\d{7}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}(?:\d{3})?</possibleNumberPattern>
-        <exampleNumber>8431234567</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <!-- 70 with 10 digits. -->
-        <nationalNumberPattern>70\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7012345678</exampleNumber>
-      </personalNumber>
-      <voip>
-        <!-- 56 with 10 digits. -->
-        <nationalNumberPattern>56\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5612345678</exampleNumber>
-      </voip>
-      <uan>
-        <!-- 30d, 33d, 34d, 37d, 55 with 10 digits. -->
-        <nationalNumberPattern>
-          (?:
-            3[0347]|
-            55
-          )\d{8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5512345678</exampleNumber>
-      </uan>
-      <shortCode>
-        <!-- This is a list of the ones that can be called. -->
-        <nationalNumberPattern>
-          1(?:
-            0[01]|
-            1(?:
-              [12]|
-              [68]\d{3}
-            )|
-            2[123]|
-            33|
-            4(?:
-              1|
-              7\d
-            )|
-            5\d|
-            70\d|
-            800\d|
-            9[15]
-          )|
-          2(?:
-            02|
-            2(?:
-              02|
-              11|
-              2
-            )|
-            3(?:
-              02|
-              45
-            )
-            425
-          )|
-          3[13]3|
-          4(?:
-            0[02]|
-            35[01]|
-            44[45]|
-            5\d
-          )|
-          650|
-          789|
-          9(?:
-            01|
-            99
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,6}</possibleNumberPattern>
-        <exampleNumber>150</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Grenada -->
-    <!-- http://www.itu.int/oth/T0202000057/en -->
-    <territory id="GD" countryCode="1" leadingDigits="473"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[489]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          473(?:
-            2(?:
-              3[0-2]|
-              69
-            )|
-            3(?:
-              2[89]|
-              86
-            )|
-            4(?:
-              [06]8|
-              3[5-9]|
-              4[0-49]|
-              5[5-79]|
-              73|
-              90
-            )|
-            63[68]|
-            7(?:
-              58|
-              84
-            )|
-            938
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>4732691234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          473(?:
-            4(?:
-              0[3-79]|
-              1[04-9]|
-              20|
-              58
-            )|
-            53[3-8]
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>4734031234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Georgia -->
-    <!-- http://www.itu.int/oth/T0202000050/en -->
-    <territory id="GE" countryCode="995" internationalPrefix="8~10"
-               nationalPrefix="8" nationalPrefixFormattingRule="$NP $FG">
-      <availableFormats>
-        <!-- Format isn't very strictly defined - the yellow pages omits area code and does 2 2 2,
-             the chairman on the communications commission listed his as 2 2 4 (Tblisi area
-             code). -->
-        <numberFormat pattern="(32)(\d{2})(\d{2})(\d{2})"
-           nationalPrefixFormattingRule="$NP ($FG)">
-          <leadingDigits>32</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d)(\d{2})(\d{2})"
-           nationalPrefixFormattingRule="$NP ($FG)">
-          <leadingDigits>
-            [24]|
-            3[13-79]
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[5679]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(800)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [1-579]\d{7}|
-          8\d{8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Added the 250, 253 and 255 prefixes as there are lots of numbers on the internet with
-             that prefix. We also list the old prefixes first, and then the new prefixes, to make it
-             easier to delete the old prefixes at the end of May 2011.  -->
-        <nationalNumberPattern>
-          (?:
-            122|
-            2(?:
-              22|
-              36|
-              5[035]
-            )|
-            3(?:
-              1[0-35-8]|
-              3[1-35679]|
-              4\d|
-              7[0-39]|
-              9[1-35-7]
-            )|
-            3(?:
-              [256]\d|
-              4[124-9]|
-              7[0-4]
-            )|
-            4(?:
-              1\d|
-              2[2-7]|
-              3[1-79]|
-              4[2-8]|
-              7[239]|
-              9[1-7]
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,8}</possibleNumberPattern>
-        <exampleNumber>32123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            5[1578]|
-            6[28]|
-            7[0147-9]|
-            9[0135-9]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>55123456</exampleNumber>
-      </mobile>
-      <!-- Information from www.yell.ge, examples such as Wissol Petroleum Georgia hotline. -->
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <!-- It seems there may be special 6 digit numbers beginning with 91, but we are not sure, so
-           these are omitted for now. -->
-    </territory>
-
-    <!-- French Guiana (French Dept. of) -->
-    <territory id="GF" countryCode="594" internationalPrefix="00">
-    </territory>
-
-    <!-- Guernsey -->
-    <!-- Inherits formatting rules from the UK. -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_the_United_Kingdom -->
-    <territory id="GG" countryCode="44" internationalPrefix="00"
-               nationalPrefix="0" preferredExtnPrefix=" x" nationalPrefixFormattingRule="$NP$FG">
-      <generalDesc>
-        <nationalNumberPattern>[135789]\d{6,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <areaCodeOptional>
-        <nationalNumberPattern>1481[2-9]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1481250123</exampleNumber>
-      </areaCodeOptional>
-      <!-- Specific to GG. -->
-      <fixedLine>
-        <!-- 1481 with 10 digits. -->
-        <nationalNumberPattern>1481\d{6}</nationalNumberPattern>
-        <exampleNumber>1481456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- 7781, 7839, 7911 with 10 digits. -->
-        <nationalNumberPattern>
-          7(?:
-            781|
-            839|
-            911
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7781123456</exampleNumber>
-      </mobile>
-      <!-- Other numbers as per GB. -->
-      <pager>
-        <nationalNumberPattern>
-          76(?:
-            0[012]|
-            2[356]|
-            4[0134]|
-            5[49]|
-            6[0-369]|
-            77|
-            81|
-            9[39]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7640123456</exampleNumber>
-      </pager>
-      <tollFree>
-        <nationalNumberPattern>
-          80(?:
-            0(?:
-              1111|
-              \d{6,7}
-            )|
-            8\d{7}
-          )|
-          500\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}(?:\d{2,3})?</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          (?:
-            87[123]|
-            9(?:
-              [01]\d|
-              8[0-3]
-            )
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9012345678</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>
-          8(?:
-            4(?:
-              5464\d|
-              [2-5]\d{7}
-            )|
-            70\d{7}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}(?:\d{3})?</possibleNumberPattern>
-        <exampleNumber>8431234567</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>70\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7012345678</exampleNumber>
-      </personalNumber>
-      <voip>
-        <nationalNumberPattern>56\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5612345678</exampleNumber>
-      </voip>
-      <uan>
-        <nationalNumberPattern>
-          (?:
-            3[0347]|
-            55
-          )\d{8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5512345678</exampleNumber>
-      </uan>
-      <shortCode>
-        <nationalNumberPattern>
-          1\d{2}(?:\d{3})?|
-          999
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,6}</possibleNumberPattern>
-        <exampleNumber>150</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Ghana -->
-    <!-- http://www.itu.int/oth/T0202000052/en -->
-    <!-- http://www.nca.org.gh/index.php?option=com_content&view=article&id=90&Itemid=65 -->
-    <territory id="GH" countryCode="233" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
-            <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[235]\d{6,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          3(?:
-            0[237]\d|
-            [167](?:
-              2[0-6]|
-              7\d
-            )|
-            2(?:
-              2[0-5]|
-              7\d
-            )|
-            3(?:
-              2[0-37]|
-              7\d
-            )|
-            4(?:
-              [27]\d|
-              30
-            )|
-            5(?:
-              2[0-7]|
-              7\d
-            )|
-            8(?:
-              2[0-2]|
-              7\d
-            )|
-            9(?:
-              20|
-              7\d
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-        <exampleNumber>302345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          2(?:
-            (?:
-              [47]\d|
-              08
-            )\d{6}|
-            [368]\d{7}
-          )|
-          54\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>231234567</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-    </territory>
-
-    <!-- Gibraltar -->
-    <territory id="GI" countryCode="350" internationalPrefix="00">
-      <!-- No formatting rules - numbers are always formatted as a block. -->
-      <generalDesc>
-        <nationalNumberPattern>[2568]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2(?:
-            00\d|
-            16[0-7]|
-            22[2457]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>20012345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            5[4-8]|
-            60
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>57123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{6}</nationalNumberPattern>
-        <exampleNumber>80123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>8[1-689]\d{6}</nationalNumberPattern>
-        <exampleNumber>88123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>87\d{6}</nationalNumberPattern>
-        <exampleNumber>87123456</exampleNumber>
-      </sharedCost>
-      <shortCode>
-        <nationalNumberPattern>
-          1(?:
-            00|
-            1(?:
-              2|
-              6(?:
-                00[06]|
-                11[17]
-              )|
-              8\d{2}
-            )|
-            23|
-            4(?:
-              1|
-              7[014]
-            )|
-            5[015]|
-            9[0349]
-          )|
-          8(?:
-            00|
-            4[0-2]|
-            8\d
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,6}</possibleNumberPattern>
-        <exampleNumber>116123</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Greenland -->
-    <!-- http://www.itu.int/oth/T0202000056/en -->
-    <territory id="GL" countryCode="299" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-689]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Including VSAT numbers here. -->
-        <nationalNumberPattern>
-          (?:
-            19|
-            3[1-6]|
-            6[14689]|
-            8[14-79]|
-            9\d
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>321000</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[245][2-9]\d{4}</nationalNumberPattern>
-        <exampleNumber>221234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{4}</nationalNumberPattern>
-        <exampleNumber>801234</exampleNumber>
-      </tollFree>
-      <voip>
-        <nationalNumberPattern>3[89]\d{4}</nationalNumberPattern>
-        <exampleNumber>381234</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Gambia -->
-    <!-- http://www.itu.int/oth/T020200004F/en -->
-    <territory id="GM" countryCode="220" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[3-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            4(?:
-              [23]\d{2}|
-              4(?:
-                1[024679]|
-                [6-9]\d
-              )
-            )|
-            5(?:
-              54[0-7]|
-              6(?:
-                [67]\d
-              )|
-              7(?:
-                1[04]|
-                2[035]|
-                3[58]|
-                48
-              )
-            )|
-            8\d{3}
-          )\d{3}
-        </nationalNumberPattern>
-        <exampleNumber>5661234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[3679]\d{6}</nationalNumberPattern>
-        <exampleNumber>3012345</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Guinea -->
-    <!-- http://www.itu.int/oth/T020200005B/en -->
-    <territory id="GN" countryCode="224" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[3567]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          30(?:
-            24|
-            3[12]|
-            4[1-35-7]|
-            5[13]|
-            6[189]|
-            [78]1|
-            9[1478]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>30241234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- WiMAX is in the plan - which is a wireless broadband protocol. Not including this in
-             the metadata for now unless this proves to be necessary. These would start with 79. -->
-        <nationalNumberPattern>
-          55\d{6}|
-          6(?:
-            0(?:
-              2\d|
-              3[3467]|
-              5[2457-9]
-            )|
-            [24578]\d{2}|
-            3(?:
-              [14]0|
-              35
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>60201234</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Guadeloupe -->
-    <!-- http://www.itu.int/oth/T0202000058/en -->
-    <territory id="GP" countryCode="590" internationalPrefix="00"
-               mainCountryForCode="true" nationalPrefix="0"
-               nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([56]90)(\d{2})(\d{4})">
-          <format>$1 $2-$3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[56]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- The plan says 59011 and 59012 are not implemented yet, but is from 2006 and online
-             examples can be found. -->
-        <nationalNumberPattern>
-          590(?:
-            1[12]|
-            2[0-68]|
-            3[28]|
-            4[126-8]|
-            5[067]|
-            6[018]|
-            [89]\d
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>590201234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          690(?:
-            00|
-            [3-5]\d|
-            6[0-57-9]|
-            7[1-6]|
-            8[0-6]|
-            9[09]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>690301234</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Equatorial Guinea -->
-    <!-- http://www.itu.int/oth/T0202000041/en -->
-    <territory id="GQ" countryCode="240" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
-          <leadingDigits>[235]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{6})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[23589]\d{8}</nationalNumberPattern>
-        <!-- The 6 here refers to the old number pattern - numbers written down may still be this
-             length although they can no longer be dialled. -->
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          3(?:
-            3(?:
-              3\d[7-9]|
-              [0-24-9]\d[46]
-            )|
-            5\d{2}[7-9]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>333091234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            222|
-            551
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>222123456</exampleNumber>
-      </mobile>
-      <!-- Note that personal and sharedCost numbers are said to go under here too - hopefully when
-           they start allocating them there will be a differentiation of prefixes, but this is not
-           clear now. -->
-      <tollFree>
-        <nationalNumberPattern>80\d[1-9]\d{5}</nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90\d[1-9]\d{5}</nationalNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Greece -->
-    <!-- http://www.itu.int/oth/T0202000055/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B30 -->
-    <territory id="GR" countryCode="30" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([27]\d)(\d{4})(\d{4})">
-          <leadingDigits>
-            21|
-            7
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            2[2-9]1|
-            [689]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(2\d{3})(\d{6})">
-          <leadingDigits>2[2-9][02-9]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[26-9]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2(?:
-            1\d{2}|
-            2(?:
-              3[1-8]|
-              4[1-7]|
-              5[1-4]|
-              6[1-8]|
-              7[1-5]|
-              [289][1-9]
-            )|
-            3(?:
-              1\d|
-              2[1-5]|
-              3[1-4]|
-              [45][1-3]|
-              7[1-7]|
-              8[1-6]|
-              9[1-79]
-            )|
-            4(?:
-              1\d|
-              2[1-8]|
-              3[1-4]|
-              4[13-5]|
-              6[1-578]|
-              9[1-5]
-            )|
-            5(?:
-              1\d|
-              2[1-3]|
-              4[124]|
-              5[1-6]|
-              [39][1-4]
-            )|
-            6(?:
-              1\d|
-              3[24]|
-              4[1-7]|
-              5[13-9]|
-              [269][1-6]|
-              7[14]|
-              8[1-35]
-            )|
-            7(?:
-              1\d|
-              [23][1-5]|
-              4[1-7]|
-              5[1-57]|
-              6[134]|
-              9[15-7]
-            )|
-            8(?:
-              1\d|
-              2[1-5]|
-              [34][1-4]|
-              9[1-7]
-            )
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>2123456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>69\d{8}</nationalNumberPattern>
-        <exampleNumber>6912345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90[19]\d{7}</nationalNumberPattern>
-        <exampleNumber>9091234567</exampleNumber>
-      </premiumRate>
-      <!-- Including calls with maximum charge of 0,25 EUR/minute here instead of under premium
-           rate. -->
-      <sharedCost>
-        <nationalNumberPattern>
-          8(?:
-            0[16]|
-            12|
-            25
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>8011234567</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>70\d{8}</nationalNumberPattern>
-        <exampleNumber>7012345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Guatemala -->
-    <territory id="GT" countryCode="502" internationalPrefix="00">
-    </territory>
-
-    <!-- Guam -->
-    <!-- http://en.wikipedia.org/wiki/%2B1_671 -->
-    <territory id="GU" countryCode="1" leadingDigits="671"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[689]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          671(?:
-            3\d{2}|
-            47\d|
-            56\d|
-            6[3-5]\d|
-            7(?:
-              3\d|
-              89
-            )|
-            828
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>6713123456</exampleNumber>
-      </fixedLine>
-      <!-- We assume mobile phone numbers to be the same as fixed-line - further info unavailable -->
-      <mobile>
-        <nationalNumberPattern>
-          671(?:
-            3\d{2}|
-            47\d|
-            56\d|
-            6[3-5]\d|
-            7(?:
-              3\d|
-              89
-            )|
-            828
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>6713123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Guinea-Bissau -->
-    <!-- http://www.itu.int/oth/T020200005C/en -->
-    <territory id="GW" countryCode="245" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[3567]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          3(?:
-            2[0125]|
-            3[1245]|
-            4[12]|
-            5[1-4]|
-            70|
-            9[1-467]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>3201234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[5-7]\d{6}</nationalNumberPattern>
-        <exampleNumber>5012345</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Guyana -->
-    <territory id="GY" countryCode="592" internationalPrefix="001"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Hong Kong -->
-    <!-- http://www.ofta.gov.hk/numbering/main.html -->
-    <territory id="HK" countryCode="852" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{4})(\d{4})">
-          <leadingDigits>
-            [235-7]|
-            [89](?:
-              0[1-9]|
-              [1-9]
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(800)(\d{3})(\d{3})">
-          <leadingDigits>800</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(900)(\d{2})(\d{3})(\d{3})">
-          <leadingDigits>900</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <!-- Slightly more complex pattern to allow the country code to be stripped off if
-             necessary. -->
-        <nationalNumberPattern>
-          [235-7]\d{7}|
-          8\d{7,8}|
-          9\d{7,10}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[23]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>21234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[5-79]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>51234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>90012345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <nationalNumberPattern>8[1-3]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </personalNumber>
-    </territory>
-
-    <!-- Honduras -->
-    <!-- http://www.itu.int/oth/T020200005F/en -->
-    <!-- It seems there is no longer a trunk prefix in use, based on websites like
-         http://www.howtocallabroad.com/codes.html and on seeing how locals write their numbers in
-         national format. -->
-    <territory id="HN" countryCode="504" internationalPrefix="00" >
-      <availableFormats>
-       <numberFormat pattern="(\d{4})(\d{4})">
-         <format>$1-$2</format>
-       </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[237-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2(?:
-            2(?:
-              0[019]|
-              1[1-36]|
-              [23]\d|
-              4[056]|
-              5[57]|
-              9[01]
-            )|
-            4(?:
-              2|3-59]|
-              3[13-689]|
-              4[0-68]|
-              5[1-35]
-            )|
-            5(?:
-              4[3-5]|
-              5\d|
-              6[56]|
-              74
-            )|
-            6(?:
-              4[0-378]|
-              [56]\d|
-              [78][0-8]|
-              9[01]
-            )|
-            7(?:
-              6[46-9]|
-              7[02-9]|
-              8[34]
-            )|
-            8(?:
-              79|
-              8[0-35789]|
-              9[1-57-9]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>22123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[37-9]\d{7}</nationalNumberPattern>
-        <exampleNumber>91234567</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Croatia -->
-    <!-- http://www.itu.int/oth/T0202000032/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B385 -->
-    <territory id="HR" countryCode="385" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- The plan says 1 XXX XXXX but the government and local telecom websites are formatted 1
-             XXXX XXX, so we prefer that formatting here. These same sources prefer XXX XXX to XX
-             XXXX as well. -->
-       <numberFormat pattern="(1)(\d{4})(\d{3})">
-         <leadingDigits>1</leadingDigits>
-         <format>$1 $2 $3</format>
-       </numberFormat>
-       <numberFormat pattern="(6[029])(\d{4})(\d{3})">
-         <leadingDigits>6[029]</leadingDigits>
-         <format>$1 $2 $3</format>
-       </numberFormat>
-       <numberFormat pattern="([2-5]\d)(\d{3})(\d{3})">
-         <leadingDigits>[2-5]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(9[12589])(\d{3,4})(\d{3,4})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(9[12589])(\d{3,4})(\d{3})(\d{3})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2,3})">
-          <leadingDigits>
-            6[145]|
-            7
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3,4})(\d{3})">
-          <leadingDigits>
-            6[145]|
-            7
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(80[01])(\d{2})(\d{2,3})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(80[01])(\d{3,4})(\d{3})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [1-7]\d{5,8}|
-          [89]\d{6,11}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,12}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Supporting 060 (general service), 062 (universal access), 069 (children service)
-             numbers here too. -->
-        <nationalNumberPattern>
-          (?:
-            1|
-            6[029]
-          )\d{7}|
-          (?:
-            2[0-3]|
-            3[1-5]|
-            4[02-47-9]|
-            5[1-3]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>12345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>9[12589]\d{6,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,12}</possibleNumberPattern>
-        <exampleNumber>912345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80[01]\d{4,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <!-- 061 is for TeleVoting numbers - but these are charged at similar rates to premium rate
-             so we include them here. -->
-        <nationalNumberPattern>6[145]\d{4,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>611234</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <nationalNumberPattern>7[45]\d{4,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>741234567</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Haiti -->
-    <!-- http://www.itu.int/oth/T020200005E/en -->
-    <!-- http://www.numberingplans.com/ -->
-    <territory id="HT" countryCode="509" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{4})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-489]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- The prefix 24 seems to be also used, based on online searches. -->
-        <nationalNumberPattern>
-          2(?:
-            [24]\d|
-            5[1-5]|
-            94
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>22453300</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            3[4-9]|
-            4\d
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>34101234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- ITU document says numbers with prefix 8 are "value-added services and free numbers
-             without making any further distinction. However, http://www.numberingplans.com/ seems
-             to suggest they are free. -->
-        <nationalNumberPattern>8\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <voip>
-        <!-- ITU document suggests 98\d{6}, but http://www.numberingplans.com/ restricts it to
-             98[89]\d{5}. -->
-        <nationalNumberPattern>98[89]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>98901234</exampleNumber>
-      </voip>
-      <shortCode>
-        <nationalNumberPattern>1\d{2}</nationalNumberPattern>
-        <possibleNumberPattern>\d{3}</possibleNumberPattern>
-        <exampleNumber>114</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Hungary -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000610001MSWE.doc -->
-    <territory id="HU" countryCode="36" internationalPrefix="00"
-               nationalPrefix="06" nationalPrefixFormattingRule="($FG)">
-      <!-- Although the national prefix is necessary for dialling, the preferred format (confirmed
-           by a Hungarian person and following the yellow pages) is to omit this when formatting.
-           Yellow pages: www.aranyoldalak.hu -->
-      <availableFormats>
-        <numberFormat pattern="(1)(\d{3})(\d{4})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{3,4})">
-          <leadingDigits>[2-9]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{8,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Includes numbers for corporate networks. -->
-        <nationalNumberPattern>
-          (?:
-            1\d|
-            2(?:
-              1\d|
-              [2-9]
-            )|
-            3[2-7]|
-            4[24-9]|
-            5[2-79]|
-            6[23689]|
-            7(?:
-              1\d|
-              [2-9]
-            )|
-            8[2-57-9]|
-            9[2-69]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>12345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            [27]0|
-            3[01]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>201234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>9[01]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>40\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>40123456</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Indonesia -->
-    <!-- http://www.itu.int/oth/T0202000064/en (from 2001, very out-of-date) -->
-    <!-- http://en.wikipedia.org/wiki/%2B62 -->
-    <territory id="ID" countryCode="62" internationalPrefix="0(?:0[1789]|10(?:00|1[67]))"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="($NP$FG)"
-          pattern="(\d{2})(\d{7,8})">
-          <leadingDigits>
-            2[124]|
-            [36]1
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="($NP$FG)"
-          pattern="(\d{3})(\d{5,7})">
-          <leadingDigits>
-            [4579]|
-            2[035-9]|
-            [36][02-9]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(8\d{2})(\d{3,4})(\d{3,4})">
-          <leadingDigits>8[1-35-9]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(177)(\d{6,8})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- http://en.wikipedia.org/wiki/Toll-free_telephone_number, and examples on the web show
-             that sometimes they are followed by less digits. -->
-        <numberFormat pattern="(800)(\d{5,7})">
-          <leadingDigits>800</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(809)(\d)(\d{3})(\d{3})">
-          <leadingDigits>809</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{6,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Area codes taken from wikipedia, with missing ones added from
-             http://www.telkom.co.id/customer-services/area-and-country-code/?type=area.
-             We also added 0770 after user feedback because it seems to be used on Bintan island.
-             -->
-        <nationalNumberPattern>
-          2[124]\d{7,8}|
-          (?:
-            2(?:
-              [35][1-4]|
-              6[0-8]|
-              7[1-6]|
-              8\d|
-              9[1-8]
-            )|
-            3(?:
-              1|
-              2[1-578]|
-              3[1-68]|
-              4[1-3]|
-              5[1-8]|
-              6[1-3568]|
-              7[0-46]|
-              8\d
-            )|
-            4(?:
-              0[1-589]|
-              1[01347-9]|
-              2[0-36-8]|
-              3[0-24-68]|
-              5[1-378]|
-              6[1-5]|
-              7[134]|
-              8[1245]
-            )|
-            5(?:
-              1[1-35-9]|
-              2[25-8]|
-              3[1246-9]|
-              4[1-3589]|
-              5[1-46]|
-              6[1-8]
-            )|
-            6(?:
-              19? |
-              [25]\d|
-              3[1-469]|
-              4[1-6]
-            )|
-            7(?:
-              1[1-46-9]|
-              2[14-9]|
-              [36]\d|
-              4[1-8]|
-              5[1-9]|
-              7[0-36-9]
-            )|
-            9(?:
-              0[12]|
-              1[0134-8]|
-              2[0-479]|
-              5[125-8]|
-              6[23679]|
-              7[159]|
-              8[01346]
-            )
-          )\d{5,8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,10}</possibleNumberPattern>
-        <exampleNumber>612345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>8[1-35-9]\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,11}</possibleNumberPattern>
-        <exampleNumber>812345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          177\d{6,8}|
-          800\d{5,7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,11}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <!-- The infomation below is provided by an Indonesian -->
-      <premiumRate>
-        <nationalNumberPattern>809\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8091234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Ireland -->
-    <!-- http://www.comreg.ie/_fileupload/publications/ComReg0802.pdf -->
-    <!-- http://www.comreg.ie/_fileupload/publications/ComReg0435.pdf -->
-    <!-- http://www.comreg.ie/_fileupload/publications/ComReg03147.pdf -->
-    <territory id="IE" countryCode="353" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)">
-      <availableFormats>
-        <numberFormat pattern="(1)(\d{3,4})(\d{4})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{5})">
-          <leadingDigits>
-            2[2-9]|
-            4[347]|
-            5[2-58]|
-            6[2-47-9]|
-            9[3-9]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{5})">
-          <leadingDigits>
-            40[24]|
-            50[45]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(48)(\d{4})(\d{4})">
-          <leadingDigits>48</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(818)(\d{3})(\d{3})">
-          <leadingDigits>81</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{3,4})">
-          <leadingDigits>
-            [24-69]|
-            7[14]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="([78]\d)(\d{3,4})(\d{4})">
-          <leadingDigits>
-            76|
-            8[35-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(700)(\d{3})(\d{3})">
-          <leadingDigits>70</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG" pattern="(\d{4})(\d{3})(\d{3})">
-          <leadingDigits>
-            1(?:
-              8[059]|
-              5
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              8[059]0|
-              5
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[124-9]\d{6,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- We allow 6-7 digit subscriber numbers for the 021 area code since that seems to be
-             reflected by the numbers in the Yellow Pages. The 023, 043, 052 and 064 area codes also
-             may have 7 digit subscriber numbers, although limited to 5 in the plan. This was caused
-             by a numbering update in 2008 (http://www.wtng.info/wtng-353-ie.html has more details).
-             Other changes not in the plan include consolidating 0502, 0506 and 0509 into 057 and
-             054, 055 and 053 into 053, and making 044 be followed by 7 digits in some cases.
-             Another peculiarity is that 048 actually replaces 00 44 28 when Irish people dial,
-             allowing them to easily dial Northern Ireland. We support these numbers here, although
-             technically they are numbers for the UK. -->
-        <nationalNumberPattern>
-          1\d{7,8}|
-          2(?:
-            1\d{6,7}|
-            [24-9]\d{5}|
-            3\d{5,7}
-          )|
-          4(?:
-            0[24]\d{5}|
-            [1269]\d{7}|
-            [34]\d{5,7}|
-            5\d{6}|
-            7\d{5}|
-            8[0-46-9]\d{7}
-          )|
-          5(?:
-            0[45]\d{5}|
-            1\d{6}|
-            2\d{5,7}|
-            [3679]\d{7}|
-            8\d{5}
-          )|
-          6(?:
-            1\d{6}|
-            4\d{5,7}|
-            [237-9]\d{5}|
-            [56]\d{7}
-          )|
-          7[14]\d{7}|
-          9(?:
-            1\d{6}|
-            [04]\d{7}|
-            [3-9]\d{5}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,10}</possibleNumberPattern>
-        <exampleNumber>2212345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          8(?:
-            22\d{6}|
-            [35-9]\d{7,8}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>850123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>1800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          15(?:
-            1[2-9]|
-            [2-8]0|
-            59|
-            9[089]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1520123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>18[59]0\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1850123456</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>700\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>700123456</exampleNumber>
-      </personalNumber>
-      <voip>
-        <nationalNumberPattern>76\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>761234567</exampleNumber>
-      </voip>
-      <uan>
-        <nationalNumberPattern>818\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>818123456</exampleNumber>
-      </uan>
-    </territory>
-
-    <!-- Israel -->
-    <!-- http://www.itu.int/oth/T020200006A/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B972 -->
-    <!-- http://www.wtng.info/wtng-972-il.html -->
-    <!-- http://www.moc.gov.il/new/documents/engineering/MISP0200.ppt (in Hebrew) -->
-    <!-- Formatting practice following wikipedia, and government sites. -->
-    <territory id="IL" countryCode="972" internationalPrefix="0(?:0|1[2-48])"
-               nationalPrefix="0" nationalPrefixFormattingRule="$FG">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="([2-489])(\d{3})(\d{4})">
-          <leadingDigits>[2-489]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="([57]\d)(\d{3})(\d{4})">
-          <leadingDigits>[57]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(1)([7-9]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>1[7-9]</leadingDigits>
-          <format>$1-$2-$3-$4</format>
-        </numberFormat>
-        <!-- The following number is for hospitals. -->
-        <numberFormat pattern="(1255)(\d{3})">
-          <leadingDigits>125</leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-        <numberFormat pattern="(1200)(\d{3})(\d{3})">
-          <leadingDigits>120</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(1212)(\d{2})(\d{2})">
-          <leadingDigits>121</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <!-- These are 4-digit star numbers which are only accessible within Israel and must be
-             dialed with a star in front of the number. -->
-        <numberFormat pattern="(\d{4})">
-          <leadingDigits>[2-689]</leadingDigits>
-          <format>*$1</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc >
-        <nationalNumberPattern>
-          [17]\d{6,9}|
-          [2-589]\d{3}(?:\d{3,6})?|
-          6\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
-      </generalDesc>
-      <noInternationalDialling>
-        <nationalNumberPattern>
-          1700\d{6}|
-          [2-689]\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
-        <exampleNumber>1700123456</exampleNumber>
-      </noInternationalDialling>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            [2-489]|
-            7[2-46-8]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-        <exampleNumber>21234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>5[024679]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>501234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          1(?:
-            80[01]\d{3}|
-            255
-          )\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-        <exampleNumber>1800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-          <!-- Peculiarly, one source states that 1956 and 1957 are the new premium rate prefixes.
-               However, no online numbers starting with these prefixes can be found, and this data
-               is not found in any other source. Instead, 1919 numbers are commonly used online for
-               these services, so we support them. -->
-          <!-- 1200 and 1212 numbers are for televoting. -->
-        <nationalNumberPattern>
-          1(?:
-            212|
-            (?:
-              919|
-              200
-            )\d{2}
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-        <exampleNumber>1919123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>
-          1(?:
-            700|
-            809
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1700123456</exampleNumber>
-      </sharedCost>
-      <voip>
-        <nationalNumberPattern>77\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>771234567</exampleNumber>
-      </voip>
-      <uan>
-        <!-- 4-digit star numbers. -->
-        <nationalNumberPattern>[2-689]\d{3}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4}</possibleNumberPattern>
-        <exampleNumber>2250</exampleNumber>
-      </uan>
-      <shortCode>
-        <nationalNumberPattern>1\d{3}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4}</possibleNumberPattern>
-        <exampleNumber>1455</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Isle of Man -->
-    <!-- Inherits formatting rules from the UK. -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_the_United_Kingdom -->
-    <territory id="IM" countryCode="44" internationalPrefix="00"
-               nationalPrefix="0" preferredExtnPrefix=" x" nationalPrefixFormattingRule="$NP$FG">
-      <generalDesc>
-        <nationalNumberPattern>[135789]\d{6,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <areaCodeOptional>
-        <nationalNumberPattern>1624[2-9]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1624250123</exampleNumber>
-      </areaCodeOptional>
-      <!-- Specific to IM. -->
-      <fixedLine>
-        <!-- 1624 with 10 digits. -->
-        <nationalNumberPattern>1624\d{6}</nationalNumberPattern>
-        <exampleNumber>1624456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- 7524, 7624, 7924 with 10 digits. -->
-        <nationalNumberPattern>7[569]24\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7924123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- 808 162 with 10 digits. -->
-        <nationalNumberPattern>808162\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8081624567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <!-- 872 299, 900 624, 901 624, 906 624, 907 624 with 10 digits. -->
-        <nationalNumberPattern>
-          (?:
-            872299|
-            90[0167]624
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9016247890</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <!-- 844 040 6, 844 090 6, 845 624, 870 624 with 10 digits. -->
-        <nationalNumberPattern>
-          8(?:
-            4(?:
-              40[49]06|
-              5624\d
-            )|
-            70624\d
-          )\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8456247890</exampleNumber>
-      </sharedCost>
-      <!-- Other numbers as per GB. -->
-      <personalNumber>
-        <nationalNumberPattern>70\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7012345678</exampleNumber>
-      </personalNumber>
-      <voip>
-        <nationalNumberPattern>56\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5612345678</exampleNumber>
-      </voip>
-      <uan>
-        <!-- 308 162, 33d, 344 040 6, 344 090 6, 345 624, 370 624, 372 299, 55 with 10 digits. -->
-        <nationalNumberPattern>
-          3(?:
-            08162\d|
-            3\d{5}|
-            4(?:
-              40[49]06|
-              5624\d
-            )|
-            7(?:
-              0624\d|
-              2299\d
-            )
-          )\d{3}|
-          55\d{8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5512345678</exampleNumber>
-      </uan>
-      <shortCode>
-        <nationalNumberPattern>
-          1\d{2}(?:\d{3})?|
-          999
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,6}</possibleNumberPattern>
-        <exampleNumber>150</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- India -->
-    <!-- http://www.itu.int/oth/T0202000063/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B91 -->
-    <!-- Note that several changes in area codes have occurred since the numbering plan was released
-         - changes are notified on the www.bsnl.co.in website. Area codes can be verified here at
-         http://www.bsnl.co.in/stdsearch.php. -->
-    <territory id="IN" countryCode="91" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-       <availableFormats>
-         <!-- Mobile numbers. -->
-         <numberFormat pattern="(\d{2})(\d{2})(\d{6})">
-           <leadingDigits>
-             7(?:
-               39|
-               5[5-9]|
-               [67][02-9]|
-               8[0-6]
-             )|
-             8(?:
-               0[01589]|
-               1[024]|
-               8[0479]|
-               9[057-9]
-             )|
-             9
-           </leadingDigits>
-           <leadingDigits>
-             7(?:
-               39|
-               5(?:
-                 50|
-                 [6-9]
-               )|
-               [67][02-9]|
-               8[0-6]
-             )|
-             8(?:
-               0[01589]|
-               1[024]|
-               8(?:
-                 [079]|
-                 44
-               )|
-               9[057-9]
-             )|
-             9
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <!-- 2 digits area code -->
-         <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
-           <leadingDigits>
-             11|
-             2[02]|
-             33|
-             4[04]|
-             79|
-             80[2-6]
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <!-- 3 digits area code -->
-         <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-           <leadingDigits>
-             1(?:
-               2[0-249]|
-               3[0-25]|
-               4[145]|
-               [569][14]|
-               7[1257]|
-               8[1346]|
-               [68][1-9]
-             )
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-           <leadingDigits>
-             2(?:
-               1[257]|
-               3[013]|
-               4[01]|
-               5[0137]|
-               6[0158]|
-               78|
-               8[1568]|
-               9[14]
-             )
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-           <leadingDigits>
-             3(?:
-               26|
-               4[1-3]|
-               5[34]|
-               6[01489]|
-               7[02-46]|
-               8[159]
-             )
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-           <leadingDigits>
-             4(?:
-               1[36]|
-               2[1-47]|
-               3[15]|
-               5[12]|
-               6[126-9]|
-               7[0-24-9]|
-               8[013-57]|
-               9[014-7]
-             )
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-           <leadingDigits>
-             5(?:
-               [136][25]|
-               22|
-               4[28]|
-               5[12]|
-               [78]1|
-               9[15]
-             )
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-           <leadingDigits>
-             6(?:
-               12|
-               [2345]1|
-               57|
-               6[13]|
-               7[14]|
-               80
-             )
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-           <leadingDigits>
-             7(?:
-               12|
-               2[14]|
-               3[134]|
-               4[47]|
-               5[15]|
-               [67]1|
-               88
-             )
-           </leadingDigits>
-           <leadingDigits>
-             7(?:
-               12|
-               2[14]|
-               3[134]|
-               4[47]|
-               5(?:
-                 1|
-                 5[1-9]
-               )|
-               [67]1|
-               88
-             )
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-           <leadingDigits>
-             8(?:
-               16|
-               2[014]|
-               3[126]|
-               6[136]|
-               7[078]|
-               8[34]|
-               91
-             )
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <!-- 4 digits area code -->
-         <!-- Fallback for fixed-line numbers. -->
-         <numberFormat pattern="(\d{4})(\d{3})(\d{3})">
-           <leadingDigits>
-             1(?:
-               [2-579]|
-               [68][1-9]
-             )|
-             [2-8]
-           </leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <numberFormat nationalPrefixFormattingRule="$FG"
-           pattern="(1600)(\d{2})(\d{4})">
-           <leadingDigits>160</leadingDigits>
-           <leadingDigits>1600</leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-         <numberFormat nationalPrefixFormattingRule="$FG"
-           pattern="(18[06]0)(\d{2,3})(\d{4})">
-           <leadingDigits>18[06]</leadingDigits>
-           <leadingDigits>18[06]0</leadingDigits>
-           <format>$1 $2 $3</format>
-         </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{9,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- This is a list of the 2 and 3 digit area codes and the first 3
-        digits of 4 digit area codes, so we can check the following digit
-        belongs to one of the operator-codes (2-6). Operator codes from
-        wikipedia, with the addition of 5 (HFCL Infotel). Area codes starting
-        with a 7 are listed separately, since the prefixes need to be more
-        detailed as they would otherwise clash with mobile phone prefixes. -->
-        <nationalNumberPattern>
-          (?:
-            11|
-            2[02]|
-            33|
-            4[04]|
-            79|
-            80
-          )[2-6]\d{7}|
-          (?:
-            1(?:
-              2[0-249]|
-              3[0-25]|
-              4[145]|
-              [59][14]|
-              6[014]|
-              7[1257]|
-              8[01346]
-            )|
-            2(?:
-              1[257]|
-              3[013]|
-              4[01]|
-              5[0137]|
-              6[0158]|
-              78|
-              8[1568]|
-              9[14]
-            )|
-            3(?:
-              26|
-              4[1-3]|
-              5[34]|
-              6[01489]|
-              7[02-46]|
-              8[159]
-            )|
-            4(?:
-              1[36]|
-              2[1-47]|
-              3[15]|
-              5[12]|
-              6[126-9]|
-              7[0-24-9]|
-              8[013-57]|
-              9[014-7]
-            )|
-            5(?:
-              [136][25]|
-              22|
-              4[28]|
-              5[12]|
-              [78]1|
-              9[15]
-            )|
-            6(?:
-              12|
-              [2345]1|
-              57|
-              6[13]|
-              7[14]|
-              80
-            )|
-            7(?:
-              12|
-              2[14]|
-              3[134]|
-              4[47]|
-              5[15]|
-              [67]1|
-              88
-            )|
-            8(?:
-              16|
-              2[014]|
-              3[126]|
-              6[136]|
-              7[078]|
-              8[34]|
-              91
-            )
-          )[2-6]\d{6}|
-          (?:
-            (?:
-              1(?:
-                2[35-8]|
-                3[346-9]|
-                4[236-9]|
-                [59][0235-9]|
-                6[235-9]|
-                7[34689]|
-                8[257-9]
-              )|
-              2(?:
-                1[134689]|
-                3[24-8]|
-                4[2-8]|
-                5[25689]|
-                6[2-4679]|
-                7[13-79]|
-                8[2-479]|
-                9[235-9]
-              )|
-              3(?:
-                01|
-                1[79]|
-                2[1-5]|
-                4[25-8]|
-                5[125689]|
-                6[235-7]|
-                7[157-9]|
-                8[2-467]
-              )|
-              4(?:
-                1[14578]|
-                2[5689]|
-                3[2-467]|
-                5[4-7]|
-                6[35]|
-                73|
-                8[2689]|
-                9[2389]
-              )|
-              5(?:
-                [16][146-9]|
-                2[14-8]|
-                3[1346]|
-                4[14-69]|
-                5[46]|
-                7[2-4]|
-                8[2-8]|
-                9[246]
-              )|
-              6(?:
-                1[1358]|
-                2[2457]|
-                3[2-4]|
-                4[235-7]|
-                5[2-689]|
-                6[24-58]|
-                7[23-689]|
-                8[1-6]
-              )|
-              8(?:
-                1[1357-9]|
-                2[235-8]|
-                3[03-57-9]|
-                4[0-24-9]|
-                5\d|
-                6[2457-9]|
-                7[1-6]|
-                8[1256]|
-                9[2-4]
-              )
-            )\d|
-            7(?:
-              (?:
-                1[013-9]|
-                2[0235-9]|
-                3[2679]|
-                4[1-35689]|
-                5[2-46-9]|
-                [67][02-9]|
-                9\d
-              )\d|
-              8(?:
-                2[0-6]|
-                [013-8]\d
-              )
-            )
-          )[2-6]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-        <exampleNumber>1123456789</exampleNumber>
-      </fixedLine>
-      <!--http://en.wikipedia.org/wiki/Mobile_telephone_numbering_in_India -->
-      <mobile>
-        <!-- A couple of additional prefixes not found on the wikipedia page,
-             namely 7696 and 779[56] are added because SMS messages have been
-             successfully sent to these numbers. -->
-        <nationalNumberPattern>
-          (?:
-            7(?:
-              39[89]|
-              5(?:
-                50|
-                6[6-8]|
-                79|
-                [89][7-9]
-              )|
-              6(?:
-                0[027]|
-                20|
-                3[19]|
-                54|
-                65|
-                7[67]|
-                9[6-9]
-              )|
-              7(?:
-                0[89]|
-                3[589]|
-                42|
-                60|
-                9[5-9]
-              )|
-              8(?:
-                [03][07-9]|
-                14|
-                2[7-9]|
-                4[25]|
-                6[09]
-              )
-            )\d|
-            9\d{4}|
-            8(?:
-              (?:
-                0[01589]|
-                1[024]
-              )\d|
-              8(?:
-                [079]\d|
-                44
-              )|
-              9[057-9]\d
-            )\d
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9123456789</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- Information gathered from sites such as
-             http://www.surfindia.com/india-facts/toll-free-no.html and
-             http://indmusings.blogspot.com/2008/09/free-help-line-numbersindia.html -->
-        <nationalNumberPattern>
-          1(?:
-            800\d? |
-            600
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-        <exampleNumber>1800123456</exampleNumber>
-      </tollFree>
-      <!-- The metadata on premium rate is temporarily commented out as wikipedia says 900 is
-           mobile, conflicting with the national numbering plan. -->
-      <!--
-      <premiumRate>
-        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9001234567</exampleNumber>
-      </premiumRate>
-      -->
-      <uan>
-        <!-- Information gathered from sites such as http://www.calcutta.bsnl.co.in/insuan.html -->
-        <nationalNumberPattern>1860345\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>18603451234</exampleNumber>
-      </uan>
-    </territory>
-
-    <!-- British Indian Ocean Territory / Diego Garcia -->
-    <territory id="IO" countryCode="246" internationalPrefix="00">
-    </territory>
-
-    <!-- Iraq -->
-    <!-- http://en.wikipedia.org/wiki/%2B964 -->
-    <!-- http://wtng.info/wtng-964-ik.html -->
-    <territory id="IQ" countryCode="964" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(1)(\d{3})(\d{4})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([2-6]\d)(\d{3})(\d{3,4})">
-          <leadingDigits>[2-6]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(7[5-9]\d)(\d{3})(\d{4})">
-          <leadingDigits>7</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-7]\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          1\d{7}|
-          (?:
-            2[13-5]|
-            3[02367]|
-            4[023]|
-            5[03]|
-            6[026]
-          )\d{6,7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>12345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[5-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7912345678</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-    </territory>
-
-    <!-- Iran, Islamic Republic of -->
-    <!-- http://en.wikipedia.org/wiki/%2B98 -->
-    <!-- http://www.itu.int/oth/T0202000066/en -->
-    <territory id="IR" countryCode="98" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- Formatting follows wikipedia. -->
-        <numberFormat pattern="(21)(\d{4})(\d{4})">
-          <leadingDigits>21</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            [13-89]|
-            2[02-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-6]\d{4,9}|[1789]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- The patterns here are organized such that numbers with variable lengths come first,
-             followed by numbers that are 10 digits long. -->
-        <nationalNumberPattern>
-          2(?:
-            1[2-9]\d{2,7}|
-            51\d{3,7}
-          )|
-          (?:
-            241|
-            3(?:
-              11|
-              5[23]
-            )|
-            441|
-            5[14]1
-          )\d{4,7}|
-          (?:
-            3(?:
-              34|
-              41
-            )|
-            6(?:
-              11|
-              52
-            )|
-          )\d{6,7}|
-          (?:
-            1(?:
-              [134589][12]|
-              [27][1-4]
-            )|
-            2(?:
-              2[189]|
-              [3689][12]|
-              42|
-              5[256]|
-              7[34]
-            )|
-            3(?:
-              12|
-              2[1-4]|
-              3[125]|
-              4[24-9]|
-              51|
-              [6-9][12]
-            )|
-            4(?:
-              [135-9][12]|
-              2[1-467]|
-              4[2-4]
-            )|
-            5(?:
-              12|
-              2[89]|
-              3[1-5]|
-              4[2-8]|
-              [5-7][12]|
-              8[1245]
-            )|
-            6(?:
-              12|
-              [347-9][12]|
-              51|
-              6[1-6]
-            )|
-            7(?:
-              [13589][12]|
-              2[1289]|
-              4[1-4]|
-              6[1-6]|
-              7[1-3]
-            )|
-            8(?:
-              [145][12]|
-              3[124578]|
-              6[1256]|
-              7[1245]
-            )
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>2123456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          9(?:
-            1\d|
-            3[124-8]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9123456789</exampleNumber>
-      </mobile>
-      <pager>
-        <nationalNumberPattern>943[24678]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9432123456</exampleNumber>
-      </pager>
-      <!-- No tollFree or premiumRate information can be found. -->
-      <voip>
-        <!-- Includes VSAT and Boomehen Satellite numbers. -->
-        <nationalNumberPattern>993[12]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9932123456</exampleNumber>
-      </voip>
-      <uan>
-        <!-- TCI Public Relations numbers -->
-        <nationalNumberPattern>9990\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9990123456</exampleNumber>
-      </uan>
-    </territory>
-
-    <!-- Iceland -->
-    <!-- http://www.pta.is/default.aspx?cat_id=85 -->
-    <territory id="IS" countryCode="354" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <leadingDigits>[4-9]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(3\d{2})(\d{3})(\d{3})">
-          <leadingDigits>3</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [4-9]\d{6}|
-          38\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Including 87[23] XXXX here as it is listed as a fax number. -->
-        <nationalNumberPattern>
-          (?:
-            4(?:
-              1[0-245]|
-              2[0-7]|
-              [37][0-8]|
-              4[0245]|
-              5[0-356]|
-              6\d|
-              8[0-46-8]|
-              9[013-79]
-            )|
-            5(?:
-              05|
-              [156]\d|
-              2[02578]|
-              3[013-6]|
-              4[03-6]|
-              7[0-2578]|
-              8[0-25-9]|
-              9[013-689]
-            )|
-            87[23]
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>4101234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          38[59]\d{6}|
-          (?:
-            6(?:
-              1[014-8]|
-              2[0-8]|
-              3[0-27-9]|
-              4[0-29]|
-              5[029]|
-              [67][0-69]|
-              [89]\d
-            )|
-            7(?:
-              5[057]|
-              7[0-7]
-            )|
-            8(?:
-              2[0-5]|
-              [469]\d|
-              5[1-9]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>6101234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>8001234</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>9011234</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>49[013-79]\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>4931234</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Italy -->
-    <!-- http://en.wikipedia.org/wiki/%2B39 -->
-    <territory id="IT" countryCode="39" internationalPrefix="00">
-      <availableFormats>
-        <!-- The leading zero for fixed numbers will be prepended before the matching of these
-             regular expressions. -->
-        <numberFormat pattern="(0[26])(\d{3,4})(\d{4})">
-          <leadingDigits>0[26]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(0[26])(\d{4})(\d{5})">
-          <leadingDigits>0[26]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(0[26])(\d{4,6})">
-          <leadingDigits>0[26]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(0\d{2})(\d{3,4})(\d{4})">
-          <leadingDigits>0[13-57-9][0159]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(0\d{2})(\d{4,6})">
-          <leadingDigits>0[13-57-9][0159]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(0\d{3})(\d{3})(\d{4})">
-          <leadingDigits>0[13-57-9][2-46-8]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(0\d{3})(\d{4,6})">
-          <leadingDigits>0[13-57-9][2-46-8]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})">
-          <leadingDigits>
-            [13]|
-            8(?:
-              00|
-              4[78]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3,6})">
-          <leadingDigits>
-            8(?:
-              03|
-              9
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[01389]\d{5,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          0(?:
-            [26]\d{4,9}|
-            [13-57-9](?:
-              [0159]\d{4,8}|
-              [2-46-8]\d{5,8}
-            )
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,11}</possibleNumberPattern>
-        <exampleNumber>0212345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>3\d{8,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>312345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          80(?:
-            0\d{6}|
-            3\d{3}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          89(?:
-            2\d{3}|
-            9\d{6}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>899123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>84[78]\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>8481234567</exampleNumber>
-      </sharedCost>
-      <!-- The plan says these should be 6 digits long, but when you go to telephone companies in
-           Italy, such as http://www.gnetwork.it/EmailServizi/Numerazioni178/tabid/91/Default.aspx
-           and when you search for 178 numbers, they seem to all be 7 digits, so we cover both
-           lengths here. -->
-      <personalNumber>
-        <nationalNumberPattern>178\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>1781234567</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Jersey -->
-    <!-- Inherits formatting rules from the UK. -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_the_United_Kingdom -->
-    <!-- http://www.jcra.je/cms3/v2/public/cmsChild.asp?pageID=1024&childID=1036 -->
-    <territory id="JE" countryCode="44" internationalPrefix="00"
-               nationalPrefix="0" preferredExtnPrefix=" x" nationalPrefixFormattingRule="$NP$FG">
-      <generalDesc>
-        <nationalNumberPattern>[135789]\d{6,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <areaCodeOptional>
-        <nationalNumberPattern>1534[2-9]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1534250123</exampleNumber>
-      </areaCodeOptional>
-      <!-- Specific to JE. -->
-      <fixedLine>
-        <!-- 1534 with 10 digits. -->
-        <nationalNumberPattern>1534\d{6}</nationalNumberPattern>
-        <exampleNumber>1534456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- 7509, 7700, 7797, 7829, 7937 with 10 digits. -->
-        <nationalNumberPattern>
-          7(?:
-            509|
-            7(?:
-              00|
-              97
-            )|
-            829|
-            937
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7797123456</exampleNumber>
-      </mobile>
-      <pager>
-        <!-- Pager numbers as per GB. -->
-        <nationalNumberPattern>
-          76(?:
-            0[012]|
-            2[356]|
-            4[0134]|
-            5[49]|
-            6[0-369]|
-            77|
-            81|
-            9[39]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7640123456</exampleNumber>
-      </pager>
-      <!-- Specific to JE. -->
-      <tollFree>
-        <!-- 800 735, 800 781, 808 901 with 10 digits. -->
-        <nationalNumberPattern>
-          80(?:
-            07(?:
-              35|
-              81
-            )|
-            8901
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8007354567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <!-- 871 206, 900 665, 900 669, 901 810, 907 107, 907 155 with 10 digits. -->
-        <nationalNumberPattern>
-          (?:
-            871206|
-            90(?:
-              066[59]|
-              1810|
-              71(?:
-                07|
-                55
-              )
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9018105678</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <!-- 844 405, 844 442, 844 469, 844 703, 845 041, 845 800, 870 002 with 10 digits. -->
-        <nationalNumberPattern>
-          8(?:
-            4(?:
-              4(?:
-                4(?:
-                  05|
-                  42|
-                  69
-                )|
-                703
-              )|
-              5(?:
-                041|
-                800
-              )
-            )|
-            70002
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8447034567</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <!-- 70 1511 with 10 digits. -->
-        <nationalNumberPattern>701511\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7015115678</exampleNumber>
-      </personalNumber>
-      <voip>
-        <!-- VoIP numbers as per GB. -->
-        <nationalNumberPattern>56\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5612345678</exampleNumber>
-      </voip>
-      <uan>
-        <!-- 300 735, 300 781, 308 901, 33d, 344 405, 344 442, 344 469, 344 703, 345 041, 345 800,
-             370 002, 371 206, 55 with 10 digits. -->
-        <nationalNumberPattern>
-          3(?:
-            0(?:
-              07(?:
-                35|
-                81
-              )|
-              8901
-            )|
-            3\d{4}|
-            4(?:
-              4(?:
-                4(?:
-                  05|
-                  42|
-                  69
-                )|
-                703
-              )|
-              5(?:
-                041|
-                800
-              )
-            )|
-            7(?:
-              0002|
-              1206
-            )
-          )\d{4}|
-          55\d{8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5512345678</exampleNumber>
-      </uan>
-      <shortCode>
-        <!-- http://www.jcra.je/cms3/v2/public/cmsChild.asp?pageID=1024&childID=1036 -->
-        <nationalNumberPattern>
-          1(?:
-            00|
-            1(?:
-              2|
-              8\d{3}
-            )|
-            23|
-            4(?:
-              [14]|
-              28|
-              7\d
-            )|
-            5\d|
-            7(?:
-              0[12]|
-              [128]|
-              35?
-            )|
-            808|
-            9[135]
-          )|
-          23[234]|
-          999
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,6}</possibleNumberPattern>
-        <exampleNumber>150</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Jamaica -->
-    <!-- http://www.itu.int/oth/T020200006C/en -->
-    <territory id="JM" countryCode="1" leadingDigits="876"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[89]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          876(?:
-            (?:
-              5[0-26]|
-              6\d|
-              7[1-6]|
-              9[2-8]
-            )\d{5}|
-            (?:
-              7(?:
-                0[2-689]|
-                8[056]|
-                9[45]
-              )|
-              9(?:
-                0[1-8]|
-                1[02378]|
-                9[2-468]
-              )
-            )\d{4}
-          )
-        </nationalNumberPattern>
-        <exampleNumber>8765123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding 31 as the prefix was found to be valid by sending SMSs and looking at online
-             number lookup sites. -->
-        <nationalNumberPattern>
-          876(?:
-            (?:
-              21|
-              [348]\d|
-              5[78]|
-              77
-            )\d|
-            7(?:
-              0[07]|
-              8[1-47-9]|
-              9[0-36-9]
-            )|
-            9(?:
-              [01]9|
-              9[0579]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8762101234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Jordan -->
-    <!-- http://www.trc.gov.jo/images/stories/pdf/NNP_ver200[1].pdf?lang=english -->
-    <!-- http://www.itu.int/oth/T020200006E/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B962 -->
-    <territory id="JO" countryCode="962" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="($NP$FG)"
-          pattern="(\d)(\d{3})(\d{4})">
-          <leadingDigits>
-            [2356]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(7)(\d{2})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>7[457-9]</leadingDigits>
-          <format>$1 $2 $3 $4 $5</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{5,6})">
-          <leadingDigits>
-            70|
-            [89]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[235-9]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Used the plan from www.trc.gov.jo since it is much more complete than the plan on the
-             ITU website. -->
-        <nationalNumberPattern>[2356][2-8]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>62001234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          7(?:
-            [1-8]\d|
-            9[02-9]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>790123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90012345</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>
-          8(?:
-            10\d|
-            5\d{2}|
-            7(?:
-             [02]0|
-             7[08]|
-             9[09]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>85012345</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>70\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>700123456</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Japan -->
-    <!-- http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/fixed.html -->
-    <!-- http://www.numberingplans.com/?page=dialling&sub=areacodes&ac=JP -->
-    <territory id="JP" countryCode="81" internationalPrefix="010"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- Toll-free numbers -->
-        <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
-          <leadingDigits>
-            (?:
-              12|
-              99
-            )0
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <!-- Some leading digits are explicitly reserved for a particular purpose.
-             We handle them first in this rule, and let the following rules ignore those exceptions.
-             Note: The rule here is not in the files we rely on when creating the other rules.
-                   We would need to manually modify it if the Japanese goverment
-                   decided to change the rule.
-
-             (prefix): purpose
-             "50": IP phone
-             "90" and "80": Mobile phone
-             "70": PHS (Personal Handy-phone System, which has been used in Japan
-                   with Non-3G, Japanese-specific protocol).
-                   See also http://ja.wikipedia.org/wiki/PHS (Japanese)
-          -->
-        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>[57-9]0</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <!-- The order of the reg-exps are important.
-             Examples (not all):
-             - "15": 15420 -> 154-20, 15472 -> 1547-2, 15410 -> 15-410,
-             - "22": 22200 -> 22-200, 22300 -> 22-300, 22320 -> 223-20, 22350 -> 22-350
-             - "42": 42000 -> 4-2000, 42901 -> 4-2901, 42910 -> 42-910
-             - "82": 82200 -> 82-200, 82020 -> 820-20, 82400 -> 82-400
-             - "99": 99400 -> 99-400, 99430 -> 994-30, 99692 -> 9969-2, 99750 -> 997-50
-             - "993": 99330 -> 993-30, 99331 -> 99-331, 99332 -> 993-32
-          -->
-        <numberFormat pattern="(\d{4})(\d)(\d{4})">
-          <leadingDigits>
-            1(?:
-              26|
-              3[79]|
-              4[56]|
-              5[4-68]|
-              6[3-5]
-            )|
-            5(?:
-              76|
-              97
-            )|
-            499|
-            746|
-            8(?:
-              3[89]|
-              63|
-              47|
-              51
-            )|
-            9(?:
-              49|
-              80|
-              9[16]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              267|
-              3(?:
-                7[247]|
-                9[278]
-              )|
-              4(?:
-                5[67]|
-                66
-              )|
-              5(?:
-                47|
-                58|
-                64|
-                8[67]
-              )|
-              6(?:
-                3[245]|
-                48|
-                5[4-68]
-              )
-            )|
-            5(?:
-              76|
-              97
-            )9|
-            499[2468]|
-            7468|
-            8(?:
-              3(?:
-                8[78]|
-                96
-              )|
-              636|
-              477|
-              51[24]
-            )|
-            9(?:
-              496|
-              802|
-              9(?:
-                1[23]|
-                69
-              )
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              267|
-              3(?:
-                7[247]|
-                9[278]
-              )|
-              4(?:
-                5[67]|
-                66
-              )|
-              5(?:
-                47|
-                58|
-                64|
-                8[67]
-              )|
-              6(?:
-                3[245]|
-                48|
-                5[4-68]
-              )
-            )|
-            5(?:
-              769|
-              979[2-69]
-            )|
-            499[2468]|
-            7468|
-            8(?:
-              3(?:
-                8[78]|
-                96[2457-9]
-              )|
-              636[2-57-9]|
-              477|
-              51[24]
-            )|
-            9(?:
-              496|
-              802|
-              9(?:
-                1[23]|
-                69
-              )
-            )
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{4})">
-          <leadingDigits>
-            1(?:
-              2[3-6]|
-              3[3-9]|
-              4[2-6]|
-              5[2-8]|
-              [68][2-7]|
-              7[2-689]|
-              9[1-578]
-            )|
-            2(?:
-              2[034-9]|
-              3[3-58]|
-              4[0-468]|
-              5[04-8]|
-              6[013-8]|
-              7[06-9]|
-              8[02-57-9]|
-              9[13]
-            )|
-            4(?:
-              2[28]|
-              3[689]|
-              6[035-7]|
-              7[05689]|
-              80|
-              9[3-5]
-            )|
-            5(?:
-              3[1-36-9]|
-              4[4578]|
-              5[013-8]|
-              6[1-9]|
-              7[2-8]|
-              8[14-7]|
-              9[4-9]
-            )|
-            7(?:
-              2[15]|
-              3[5-9]|
-              4[02-9]|
-              6[135-8]|
-              7[0-4689]|
-              9[014-9]
-            )|
-            8(?:
-              2[49]|
-              3[3-8]|
-              4[5-8]|
-              5[2-9]|
-              6[35-9]|
-              7[579]|
-              8[03-579]|
-              9[2-8]
-            )|
-            9(?:
-              [23]0|
-              4[02-46-9]|
-              5[0245-79]|
-              6[4-9]|
-              7[2-47-9]|
-              8[02-7]|
-              9[3-7]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              2[3-6]|
-              3[3-9]|
-              4[2-6]|
-              5(?:
-                [236-8]|
-                [45][2-69]
-              )|
-              [68][2-7]|
-              7[2-689]|
-              9[1-578]
-            )|
-            2(?:
-              2(?:
-                [04-9]|
-                3[23]
-              )|
-              3[3-58]|
-              4[0-468]|
-              5(?:
-                5[78]|
-                7[2-4]|
-                [0468][2-9]
-              )|
-              6(?:
-                [0135-8]|
-                4[2-5]
-              )|
-              7(?:
-                [0679]|
-                8[2-7]
-              )|
-              8(?:
-                [024578]|
-                3[25-9]|
-                9[6-9]
-              )|
-              9(?:
-                11|
-                3[2-4]
-              )
-            )|
-            4(?:
-              2(?:
-                2[2-9]|
-                8[237-9]
-              )|
-              3[689]|
-              6[035-7]|
-              7(?:
-                [059][2-8]|
-                [68]
-              )|
-              80|
-              9[3-5]
-            )|
-            5(?:
-              3[1-36-9]|
-              4[4578]|
-              5[013-8]|
-              6[1-9]|
-              7[2-8]|
-              8[14-7]|
-              9(?:
-                [89][2-8]|
-                [4-7]
-              )
-            )|
-            7(?:
-              2[15]|
-              3[5-9]|
-              4[02-9]|
-              6[135-8]|
-              7[0-4689]|
-              9(?:
-                [017-9]|
-                4[6-8]|
-                5[2-478]|
-                6[2-589]
-              )
-            )|
-            8(?:
-              2(?:
-                4[4-8]|
-                9[2-8]
-              )|
-              3(?:
-                7[2-56]|
-                [3-6][2-9]|
-                8[2-5]
-              )|
-              4[5-8]|
-              5[2-9]|
-              6(?:
-                [37]|
-                5[4-7]|
-                6[2-9]|
-                8[2-8]|
-                9[236-9]
-              )|
-              7[579]|
-              8[03-579]|
-              9[2-8]
-            )|
-            9(?:
-              [23]0|
-              4[02-46-9]|
-              5[0245-79]|
-              6[4-9]|
-              7[2-47-9]|
-              8[02-7]|
-              9(?:
-                3[34]|
-                [4-7]
-              )
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              2[3-6]|
-              3[3-9]|
-              4[2-6]|
-              5(?:
-                [236-8]|
-                [45][2-69]
-              )|
-              [68][2-7]|
-              7[2-689]|
-              9[1-578]
-            )|
-            2(?:
-              2(?:
-                [04-9]|
-                3[23]
-              )|
-              3[3-58]|
-              4[0-468]|
-              5(?:
-                5[78]|
-                7[2-4]|
-                [0468][2-9]
-              )|
-              6(?:
-                [0135-8]|
-                4[2-5]
-              )|
-              7(?:
-                [0679]|
-                8[2-7]
-              )|
-              8(?:
-                [024578]|
-                3[25-9]|
-                9[6-9]
-              )|
-              9(?:
-                11|
-                3[2-4]
-              )
-            )|
-            4(?:
-              2(?:
-                2[2-9]|
-                8[237-9]
-              )|
-              3[689]|
-              6[035-7]|
-              7(?:
-                [059][2-8]|
-                [68]
-              )|
-              80|
-              9[3-5]
-            )|
-            5(?:
-              3[1-36-9]|
-              4[4578]|
-              5[013-8]|
-              6[1-9]|
-              7[2-8]|
-              8[14-7]|
-              9(?:
-                [89][2-8]|
-                [4-7]
-              )
-            )|
-            7(?:
-              2[15]|
-              3[5-9]|
-              4[02-9]|
-              6[135-8]|
-              7[0-4689]|
-              9(?:
-                [017-9]|
-                4[6-8]|
-                5[2-478]|
-                6[2-589]
-              )
-            )|
-            8(?:
-              2(?:
-                4[4-8]|
-                9(?:
-                  [3578]|
-                  20|
-                  4[04-9]|
-                  6[56]
-                )
-              )|
-              3(?:
-                7(?:
-                  [2-5]|
-                  6[0-59]
-                )|
-                [3-6][2-9]|
-                8[2-5]
-              )|
-              4[5-8]|
-              5[2-9]|
-              6(?:
-                [37]|
-                5(?:
-                  [467]|
-                  5[014-9]
-                )|
-                6(?:
-                  [2-8]|
-                  9[02-69]
-                )|
-                8[2-8]|
-                9(?:
-                  [236-8]|
-                  9[23]
-                )
-              )|
-              7[579]|
-              8[03-579]|
-              9[2-8]
-            )|
-            9(?:
-              [23]0|
-              4[02-46-9]|
-              5[0245-79]|
-              6[4-9]|
-              7[2-47-9]|
-              8[02-7]|
-              9(?:
-                3(?:
-                  3[02-9]|
-                  4[0-24689]
-                )|
-                4[2-69]|
-                [5-7]
-              )
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              2[3-6]|
-              3[3-9]|
-              4[2-6]|
-              5(?:
-                [236-8]|
-                [45][2-69]
-              )|
-              [68][2-7]|
-              7[2-689]|
-              9[1-578]
-            )|
-            2(?:
-              2(?:
-                [04-9]|
-                3[23]
-              )|
-              3[3-58]|
-              4[0-468]|
-              5(?:
-                5[78]|
-                7[2-4]|
-                [0468][2-9]
-              )|
-              6(?:
-                [0135-8]|
-                4[2-5]
-              )|
-              7(?:
-                [0679]|
-                8[2-7]
-              )|
-              8(?:
-                [024578]|
-                3[25-9]|
-                9[6-9]
-              )|
-              9(?:
-                11|
-                3[2-4]
-              )
-            )|
-            4(?:
-              2(?:
-                2[2-9]|
-                8[237-9]
-              )|
-              3[689]|
-              6[035-7]|
-              7(?:
-                [059][2-8]|
-                [68]
-              )|
-              80|
-              9[3-5]
-            )|
-            5(?:
-              3[1-36-9]|
-              4[4578]|
-              5[013-8]|
-              6[1-9]|
-              7[2-8]|
-              8[14-7]|
-              9(?:
-                [89][2-8]|
-                [4-7]
-              )
-            )|
-            7(?:
-              2[15]|
-              3[5-9]|
-              4[02-9]|
-              6[135-8]|
-              7[0-4689]|
-              9(?:
-                [017-9]|
-                4[6-8]|
-                5[2-478]|
-                6[2-589]
-              )
-            )|
-            8(?:
-              2(?:
-                4[4-8]|
-                9(?:
-                  [3578]|
-                  20|
-                  4[04-9]|
-                  6(?:
-                    5[25]|
-                    60
-                  )
-                )
-              )|
-              3(?:
-                7(?:
-                  [2-5]|
-                  6[0-59]
-                )|
-                [3-6][2-9]|
-                8[2-5]
-              )|
-              4[5-8]|
-              5[2-9]|
-              6(?:
-                [37]|
-                5(?:
-                  [467]|
-                  5[014-9]
-                )|
-                6(?:
-                  [2-8]|
-                  9[02-69]
-                )|
-                8[2-8]|
-                9(?:
-                  [236-8]|
-                  9[23]
-                )
-              )|
-              7[579]|
-              8[03-579]|
-              9[2-8]
-            )|
-            9(?:
-              [23]0|
-              4[02-46-9]|
-              5[0245-79]|
-              6[4-9]|
-              7[2-47-9]|
-              8[02-7]|
-              9(?:
-                3(?:
-                  3[02-9]|
-                  4[0-24689]
-                )|
-                4[2-69]|
-                [5-7]
-              )
-            )
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
-          <leadingDigits>
-            1|
-            2(?:
-              23|
-              5[5-89]|
-              64|
-              78|
-              8[39]|
-              91
-            )|
-            4(?:
-              2[2689]|
-              64|
-              7[347]
-            )|
-            5(?:
-              [2-589]|
-              39
-            )|
-            60|
-            8(?:
-              [46-9]|
-              3[279]|
-              2[124589]
-            )|
-            9(?:
-              [235-8]|
-              93
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1|
-            2(?:
-              23|
-              5(?:
-                [57]|
-                [68]0|
-                9[19]
-              )|
-              64|
-              78|
-              8[39]|
-              917
-            )|
-            4(?:
-              2(?:
-                [68]|
-                20|
-                9[178]
-              )|
-              64|
-              7[347]
-            )|
-            5(?:
-              [2-589]|
-              39[67]
-            )|
-            60|
-            8(?:
-              [46-9]|
-              3[279]|
-              2[124589]
-            )|
-            9(?:
-              [235-8]|
-              93[34]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1|
-            2(?:
-              23|
-              5(?:
-                [57]|
-                [68]0|
-                9(?:
-                  17|
-                  99
-                )
-              )|
-              64|
-              78|
-              8[39]|
-              917
-            )|
-            4(?:
-              2(?:
-                [68]|
-                20|
-                9[178]
-              )|
-              64|
-              7[347]
-            )|
-            5(?:
-              [2-589]|
-              39[67]
-            )|
-            60|
-            8(?:
-              [46-9]|
-              3[279]|
-              2[124589]
-            )|
-            9(?:
-              [235-8]|
-              93(?:
-                31|
-                4
-              )
-            )
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{4})">
-          <leadingDigits>
-            2(?:
-              9[14-79]|
-              74|
-              [34]7|
-              [56]9
-            )|
-            82|
-            993
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{4})(\d{4})">
-          <leadingDigits>
-            3|
-            4(?:
-              2[09]|
-              7[01]
-            )|
-            6[1-9]
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
-          <leadingDigits>[2479]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{9,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1(?:
-              1[236-8]|
-              2[3-6]|
-              3[3-9]|
-              4[2-6]|
-              [58][2-8]|
-              6[2-7]|
-              7[2-9]|
-              9[1-8]
-            )|
-            2[2-9]\d|
-            [36][1-9]\d|
-            4(?:
-              6[0235-8]|
-              [2-578]\d|
-              9[2-59]
-            )|
-            5(?:
-              6[1-9]|
-              7[2-8]|
-              [2-589]\d
-            )|
-            7(?:
-              3[4-9]|
-              4[02-9]|
-              [25-9]\d
-            )|
-            8(?:
-              3[2-9]|
-              4[5-9]|
-              5[1-9]|
-              8[03-9]|
-              [2679]\d
-            )|
-            9(?:
-              [679][1-9]|
-              [2-58]\d
-            )
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>312345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[7-9]0\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7012345678</exampleNumber>
-      </mobile>
-      <!-- Toll free and premium rate numbers are not clearly defined in the official Japanese
-           number plan, and do not seem to have been standardized. The information below is
-           collected from searching the web. -->
-      <tollFree>
-        <nationalNumberPattern>120\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>120123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>990\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>990123456</exampleNumber>
-      </premiumRate>
-      <!-- Uncertain on number length allowed here. -->
-      <personalNumber>
-        <nationalNumberPattern>60\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>601234567</exampleNumber>
-      </personalNumber>
-      <voip>
-        <nationalNumberPattern>50\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5012345678</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Kenya -->
-    <!-- http://www.cck.go.ke/licensing/numbering/plan.html -->
-    <territory id="KE" countryCode="254" internationalPrefix="000"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{4,7})">
-          <leadingDigits>
-            [2-6]|
-            91
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{6,7})">
-          <leadingDigits>
-            [78]|
-            90
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{6,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            20|
-            4[0-6]|
-            5\d|
-            6[0-24-9]
-          )\d{4,7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,9}</possibleNumberPattern>
-        <exampleNumber>202012345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding 716 after successful delivery of SMSs. -->
-        <nationalNumberPattern>
-          7(?:
-            1[0-6]|
-            2\d|
-            3[2-8]|
-            5[0-2]|
-            7[023]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>712123456</exampleNumber>
-      </mobile>
-      <!-- There is no document that has the information on the actual length of premium rates and
-           tollfree numbers. The information below comes from research on existing numbers. -->
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            88
-          )\d{6,7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-         <nationalNumberPattern>
-           9(?:
-             00|
-             1
-           )\d{6,7}
-         </nationalNumberPattern>
-         <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-         <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Kyrgyzstan -->
-    <!-- http://www.itu.int/oth/T0202000074/en -->
-    <territory id="KG" countryCode="996" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
-          <leadingDigits>
-            31[25]|
-            [5-8]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{4})(\d{5})">
-          <leadingDigits>
-            3(?:
-              1[36]|
-              [2-9]
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[356-8]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            3(?:
-              1(?:
-                2\d|
-                3[1-9]|
-                52|
-                6[1-8]
-              )|
-              2(?:
-                22|
-                3[0-479]|
-                6[0-7]
-              )|
-              4(?:
-                22|
-                5[6-9]|
-                6[0-4]
-              )|
-              5(?:
-                22|
-                3[4-7]|
-                59|
-                6[0-5]
-              )|
-              6(?:
-                22|
-                5[35-7]|
-                6[0-3]
-              )|
-              7(?:
-                22|
-                3[468]|
-                4[1-8]|
-                59|
-                6\d|
-                7[5-7]
-              )|
-              9(?:
-                22|
-                4[1-7]|
-                6[0-8]
-              )
-            )|
-            6(?:
-              09|
-              12|
-              2[2-4]
-            )\d
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>312123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Added 705 since SMS messages have been successfully sent to numbers with this prefix.
-         -->
-        <nationalNumberPattern>
-          5[124-7]\d{7}|
-          7(?:
-            0[05]|
-            7\d
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>700123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <!-- No premiumRate information can be found. -->
-    </territory>
-
-    <!-- Cambodia -->
-    <!-- http://www.itu.int/oth/T0202000023/en -->
-    <territory id="KH" countryCode="855" internationalPrefix="00[178]"
-               nationalPrefix="0">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(\d{2})(\d{3})(\d{3})">
-          <leadingDigits>
-            1\d[1-9]|
-            [2-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(1[89]00)(\d{3})(\d{3})">
-          <leadingDigits>1[89]0</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2[3-6]|
-            3[2-6]|
-            4[2-4]|
-            [5-7][2-5]
-          )[2-47-9]\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-        <exampleNumber>23456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding 171, 13X, 85[2-689] and 921 prefixes as SMS messages could be successfully
-             delivered to these mobile numbers. -->
-        <nationalNumberPattern>
-          (?:
-            (?:
-              1[0-35-9]|
-              9[1-49]
-            )[1-9]|
-            85[2-689]
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>91234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          1800(?:
-            1\d|
-            2[09]
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          1900(?:
-            1\d|
-            2[09]
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1900123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Kiribati -->
-    <territory id="KI" countryCode="686" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Comoros -->
-    <!-- http://www.itu.int/oth/T020200002D/en -->
-    <territory id="KM" countryCode="269" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d)(\d{3})(\d{3})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[37]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- CDMA phones are included here, as they are considered as an extension of fixed line:
-             http://www.comorestelecom.km/presentationcdma.php -->
-        <nationalNumberPattern>
-          7(?:
-            6[0-37-9]|
-            7[0-57-9]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>7712345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>3[23]\d{5}</nationalNumberPattern>
-        <exampleNumber>3212345</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Saint Kitts and Nevis -->
-    <!-- http://www.itu.int/oth/T02020000B0/en -->
-    <territory id="KN" countryCode="1" leadingDigits="869"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[89]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          869(?:
-            2(?:
-              29|
-              36
-            )|
-            4(?:
-              6[5-9]|
-              70
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>8692361234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          869(?:
-            5(?:
-              5[6-8]|
-              6[5-7]
-            )|
-            66[2-9]|
-            76[2-5]
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8695561234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!--  Korea, Dem. People's Rep. of -->
-    <territory id="KP" countryCode="850" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Korea (Rep. of) -->
-    <!-- http://www.itu.int/oth/T0202000072/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B82 -->
-    <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boardId=1074&boardSeq=2349 -->
-    <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boardId=1074&boardSeq=2240 -->
-    <!-- http://www.telecentro.co.kr/sub/index.php?job=detail&ebcf_id=faq&page=1&mid=0503&eb_seq=36 -->
-    <!-- Exceptions :
-        internationalPrefix
-            0031, 0033, 0071, 0073 - Special services of KT and DACOM, ignorable
-        nationalPrefix
-            1[4-6]XX-YYYY - Country-wide common number services, display as it is without hyphens -->
-    <territory id="KR" countryCode="82" internationalPrefix="00(?:[124-68]|[37]\d{2})"
-               nationalPrefix="0" nationalPrefixForParsing="0(8[1-46-8]|85\d{2})?"
-               nationalPrefixFormattingRule="$NP$FG" carrierCodeFormattingRule="$NP$CC-$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>
-            1(?:
-              0|
-              1[19]|
-              [69]9|
-              5[458]
-            )|
-            [57]0
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              0|
-              1[19]|
-              [69]9|
-              5(?:
-                44|
-                59|
-                8
-              )
-            )|
-            [57]0
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
-          <leadingDigits>
-            1(?:
-              [169][2-8]|
-              [78]|
-              5[1-4]
-            )|
-            [68]0|
-            [3-9][1-9][2-9]
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              [169][2-8]|
-              [78]|
-              5(?:
-                [1-3]|
-                4[56]
-              )
-            )|
-            [68]0|
-            [3-9][1-9][2-9]
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d)(\d{4})">
-          <leadingDigits>131</leadingDigits>
-          <leadingDigits>1312</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{4})">
-          <leadingDigits>131</leadingDigits>
-          <leadingDigits>131[13-9]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>13[2-9]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{3})(\d{4})">
-          <leadingDigits>30</leadingDigits>
-          <format>$1-$2-$3-$4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{4})(\d{4})">
-          <leadingDigits>
-            2(?:
-              [26]|
-              3[0-467]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            2(?:
-              [26]|
-              3(?:
-                01|
-                1[45]|
-                2[17-9]|
-                39|
-                4|
-                6[67]|
-                7[078]
-              )
-            )
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{3})(\d{4})">
-          <leadingDigits>
-            2(?:
-              3[0-35-9]|
-              [457-9]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            2(?:
-              3(?:
-                0[02-9]|
-                1[0-36-9]|
-                2[02-6]|
-                3[0-8]|
-                6[0-589]|
-                7[1-69]|
-                [589]
-              )|
-              [457-9]
-            )
-          </leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{3,4})">
-          <leadingDigits>21[0-46-9]</leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3,4})">
-          <leadingDigits>[3-9][1-9]1</leadingDigits>
-          <leadingDigits>
-            [3-9][1-9]1(?:
-              [0-46-9]
-            )
-          </leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-        <!-- Company numbers. -->
-        <numberFormat pattern="(\d{4})(\d{4})"
-          nationalPrefixFormattingRule="$FG">
-          <leadingDigits>
-            1(?:
-              5[46-9]|
-              6[04678]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            1(?:
-              5(?:
-                44|
-                66|
-                77|
-                88|
-                99
-              )|
-              6(?:
-                00|
-                44|
-                6[16]|
-                70|
-                88
-              )
-            )
-          </leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [1-79]\d{3,9}|
-          8\d{8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2|
-            [34][1-3]|
-            5[1-5]|
-            6[1-4]
-          )(?:
-            1\d{2,3}|
-            [2-9]\d{6,7}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
-        <exampleNumber>22123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>1[0-25-9]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>1023456789</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>801234567</exampleNumber>
-      </tollFree>
-      <!-- The information below is provided by a Korean person. -->
-      <premiumRate>
-        <nationalNumberPattern>60[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>602345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <nationalNumberPattern>50\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5012345678</exampleNumber>
-      </personalNumber>
-      <voip>
-        <nationalNumberPattern>70\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7012345678</exampleNumber>
-      </voip>
-      <uan>
-        <nationalNumberPattern>
-          1(?:
-            5(?:
-              44|
-              66|
-              77|
-              88|
-              99
-            )|
-            6(?:
-              00|
-              44|
-              6[16]|
-              70|
-              88
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>15441234</exampleNumber>
-      </uan>
-    </territory>
-
-    <!-- Kuwait -->
-    <!-- http://www.itu.int/oth/T0202000073/en -->
-    <territory id="KW" countryCode="965" internationalPrefix="00"
-               nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- Format is from ITU. -->
-        <numberFormat pattern="(\d{4})(\d{3,4})">
-          <leadingDigits>[1269]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(5[05]\d)(\d{5})">
-          <leadingDigits>5</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[12569]\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            18\d|
-            2(?:
-              [23]\d{2}|
-              4[1-35-9]\d|
-              5(?:
-                0[034]|
-                [2-46]\d|
-                5[1-3]|
-                7[1-7]
-              )
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>22345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            5(?:
-              0[02]|
-              5\d
-            )|
-            6(?:
-              0[034679]|
-              5[015-9]|
-              6\d|
-              7[067]
-            )|
-            9(?:
-              0[09]|
-              4[049]|
-              [79]\d
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>50012345</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-      <shortCode>
-        <nationalNumberPattern>1\d{2}</nationalNumberPattern>
-        <possibleNumberPattern>\d{3}</possibleNumberPattern>
-        <exampleNumber>177</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Cayman Islands -->
-    <!-- http://www.itu.int/oth/T0202000027/en -->
-    <territory id="KY" countryCode="1" leadingDigits="345"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[389]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          345(?:
-            2(?:
-              22|
-              44
-            )|
-            444|
-            6(?:
-              23|
-              38|
-              40
-            )|
-            7(?:
-              6[6-9]|
-              77
-            )|
-            8(?:
-              00|
-              1[45]|
-              25|
-              4[89]|
-              88
-            )|
-            9(?:
-              14|
-              4[035-9]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>3452221234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          345(?:
-            32[3-79]|
-            5(?:
-              1[467]|
-              2[5-7]|
-              4[5-9]
-            )|
-            9(?:
-              1[679]|
-              2[4-9]|
-              3[89]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>3453231234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002345678</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          900[2-9]\d{6}|
-          345976\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Kazakhstan -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Kazakhstan -->
-    <territory id="KZ" countryCode="7" internationalPrefix="8~10"
-               nationalPrefix="8" nationalPrefixFormattingRule="$NP$FG">
-       <!-- Formatting rules obtained from Russia. -->
-      <generalDesc>
-        <nationalNumberPattern>
-          (?:
-            [67]\d{2}|
-            80[09]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- VSAT numbers are also included here. -->
-        <nationalNumberPattern>
-          7(?:
-            1(?:
-              0(?:
-                [23]\d|
-                4[023]|
-                59|
-                63
-              )|
-              1(?:
-                [23]\d|
-                4[0-79]|
-                59
-              )|
-              2(?:
-                [23]\d|
-                59
-              )|
-              3(?:
-                2\d|
-                3[1-7]|
-                4[1235-9]|
-                59
-              )|
-              4(?:
-                2\d|
-                3[013-79]|
-                4[0-58]|
-                5[1-79]
-              )|
-              5(?:
-                2\d|
-                3[1-8]|
-                4[1-7]|
-                59
-              )|
-              6(?:
-                22|
-                [34]\d|
-                5[19]
-              )|
-              72\d|
-              8(?:
-                [27]\d|
-                3[1-46-9]|
-                4[0-4]|
-              )
-            )|
-            2(?:
-              1(?:
-                [23]\d|
-                4[46-9]|
-                5[3469]
-              )|
-              2(?:
-                2\d|
-                3[0679]|
-                46|
-                5[12679]|
-              )|
-              3(?:
-                [234]\d|
-                5[139]|
-              )|
-              4(?:
-                22|
-                3[1235-8]
-              )|
-              5(?:
-                [23]\d|
-                4[0124-8]|
-                59
-              )|
-              6(?:
-                22|
-                3[1-9]|
-                4[0-4]|
-                59
-              )|
-              7(?:
-                [23]\d|
-                40|
-                5[279]|
-                7\d
-              )|
-              8(?:
-                [23]\d|
-                4[0-3]|
-                59
-              )|
-              9(?:
-                2\d|
-                3[12478]|
-                59
-              )
-            )|
-            3622
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>7123456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Wikipedia says that 6xx is used for mobile phone numbers. Other metadata comes from ITU
-             document. -->
-        <nationalNumberPattern>
-          7(?:
-            0[01257]\d{2}|
-            1[2-578]9[01]|
-            2(?:
-              [13-6]9[01]|
-              7(?:
-                58|
-                9[01]
-              )
-            )|
-            6[02-4]\d{2}|
-            7[157]\d{2}
-          )\d{5}|
-          6\d{9}
-        </nationalNumberPattern>
-        <exampleNumber>7129012345</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>809\d{7}</nationalNumberPattern>
-        <exampleNumber>8091234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Lao People's Dem. Rep. -->
-    <!-- http://www.itu.int/oth/T0202000075/en -->
-    <territory id="LA" countryCode="856" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(20)(\d{2})(\d{3})(\d{3})">
-          <leadingDigits>20</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="([2-57]\d)(\d{3})(\d{3})">
-          <leadingDigits>
-            21|
-            [3-57]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-57]\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            [2-57]1|
-            54
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-        <exampleNumber>21212862</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          20(?:
-            2[23]|
-            5[4-6]|
-            77|
-            9[89]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>2023123456</exampleNumber>
-      </mobile>
-      <!-- No information on other types of phone numbers for Lao P.D.R. has been found. -->
-    </territory>
-
-    <!-- Lebanon -->
-    <!-- http://www.itu.int/oth/T0202000077/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B961 -->
-    <territory id="LB" countryCode="961" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d)(\d{3})(\d{3})">
-          <leadingDigits>
-            [13-6]|
-            7(?:
-              [2-57-9]|
-              62)|
-            [89][2-9]
-            </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([7-9]\d)(\d{3})(\d{3})">
-          <leadingDigits>
-            [89][01]|
-            7(?:
-              [01]|
-              66)
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[13-9]\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            [14-6]\d{2}|
-            7(?:
-              [2-57-9]\d|
-              62)|
-            [89][2-9]\d
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>1123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            3\d|
-            7(?:
-              [01]\d|
-              66
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>71123456</exampleNumber>
-      </mobile>
-      <premiumRate>
-        <nationalNumberPattern>8[01]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>9[01]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Saint Lucia -->
-    <!-- http://www.itu.int/oth/T02020000B1/en -->
-    <territory id="LC" countryCode="1" leadingDigits="758"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[789]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          758(?:
-            234|
-            4(?:
-              5[0-9]|
-              6[2-9]|
-              8[0-2]
-            )|
-            638|
-            758
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>7582345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding 721 and 722 as these prefixes are found widely on the internet and SMS messages
-             have been successfully delivered to these numbers. -->
-        <nationalNumberPattern>
-          758(?:
-            28[4-7]|
-            384|
-            4(?:
-              6[01]|
-              8[4-9]
-            )|
-            5(?:
-              1[89]|
-              20|
-              84
-            )|
-            7(?:
-              1[2-9]|
-              2[0-4]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7582845678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Liechtenstein -->
-    <!-- http://www.llv.li/amtsstellen/llv-ak-nummerierung.htm -->
-    <!-- http://www.telecom.li has some different patterns for tollfree and shared cost numbers -
-         look at "Mehrwertnummer". -->
-    <territory id="LI" countryCode="423" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>
-            [23]|
-            7[4-9]|
-            87
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(6\d)(\d{3})(\d{3})">
-          <leadingDigits>6</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([7-9]0\d)(\d{2})(\d{2})">
-          <leadingDigits>[7-9]0</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- 0800 and 0900 are valid prefixes, but Liechtenstein
-             doesn't have a general national prefix, so we include it manually here
-             when formatting. We can tell whether it needs one by number length. -->
-        <numberFormat pattern="([89]0\d)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[89]0</leadingDigits>
-          <format>0$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          (?:
-            66|
-            80|
-            90
-          )\d{7}|
-          [237-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Regular Cost services are included here as well. -->
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              17|
-              3\d|
-              6[02-58]|
-              96
-            )|
-            3(?:
-              02|
-              7[01357]|
-              8[048]|
-              9[0269]
-            )|
-            870
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>2345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          66(?:
-            [0178][0-4]|
-            2[025-9]|
-            [36]\d|
-            4[129]|
-            5[45]|
-            9[019]
-          )\d{5}|
-          7(?:
-            4[2-59]|
-            56|
-            [6-9]\d
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-        <exampleNumber>661234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          80(?:
-            0(?:
-              07|
-              2[238]|
-              79|
-              \d{4}
-            )|
-            9\d{2}
-          )\d{2}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-        <exampleNumber>8002222</exampleNumber>
-      </tollFree>
-      <sharedCost>
-        <nationalNumberPattern>
-          90(?:
-            0(?:
-              2[278]|
-              79|
-              \d{4}
-            )|
-            1(?:
-              23|
-              \d{4}
-            )|
-            6(?:
-              66|
-              \d{4}
-            )
-          )\d{2}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-        <exampleNumber>9002222</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>701\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>7011234</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Sri Lanka -->
-    <!-- http://en.wikipedia.org/wiki/%2B94 -->
-    <!-- http://www.itu.int/oth/T02020000C3/en -->
-    <territory id="LK" countryCode="94" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{1})(\d{6})">
-          <leadingDigits>[1-689]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
-          <leadingDigits>7</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            [189]1|
-            2[13-7]|
-            3[1-8]|
-            4[157]|
-            5[12457]|
-            6[35-7]
-          )[2-57]\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>112345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[12578]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>712345678</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Liberia -->
-    <!-- http://www.itu.int/oth/T0202000079/en -->
-    <territory id="LR" countryCode="231" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- Formatting from Ministry of Agriculture,
-        http://www.moa.gov.lr/content.php?sub=Email&?related=Contacts -->
-        <numberFormat pattern="([279]\d)(\d{3})(\d{3})">
-          <leadingDigits>[279]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([4-6])(\d{3})(\d{3})">
-          <leadingDigits>[4-6]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          (?:
-            [279]\d|
-            [4-6]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>2\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>21234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Added 66, 67 and 68 as prefixes because of online numbers fitting this pattern. -->
-        <nationalNumberPattern>
-          (?:
-            4[67]|
-            5\d|
-            6[4-8]|
-            7\d{2}
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>4612345</exampleNumber>
-      </mobile>
-      <premiumRate>
-        <!-- Telemedia service is listed under premium rate. -->
-        <nationalNumberPattern>90\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Lesotho -->
-    <!-- http://www.itu.int/oth/T0202000078/en -->
-    <territory id="LS" countryCode="266" internationalPrefix="00">
-      <availableFormats>
-        <!-- Formatting following yellow pages: www.yellowpages.co.ls -->
-        <numberFormat pattern="(\d{4})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2568]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>2\d{7}</nationalNumberPattern>
-        <exampleNumber>22123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[56]\d{7}</nationalNumberPattern>
-        <exampleNumber>50123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800[256]\d{4}</nationalNumberPattern>
-        <exampleNumber>80021234</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Lithuania -->
-    <!-- http://www.itu.int/oth/T020200007C/en -->
-    <territory id="LT" countryCode="370" internationalPrefix="00"
-               nationalPrefix="8" nationalPrefixFormattingRule="$NP $FG">
-      <availableFormats>
-        <!-- Two-digit area codes -->
-        <numberFormat pattern="([34]\d)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>
-            37|
-            4(?:
-              1|
-              5[45]|
-              6[2-4]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <!-- Three-digit area codes -->
-        <numberFormat pattern="([3-689]\d{2})(\d{2})(\d{3})">
-          <leadingDigits>
-            3[148]|
-            4(?:
-              [24]|
-              6[09]
-            )|
-            5(?:
-              [0189]|
-              28
-            )|
-            [689]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(5)(2[0-79]\d)(\d{4})">
-          <leadingDigits>52[0-79]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[3-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            3[1478]|
-            4[124-6]|
-            52
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>31234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>6\d{7}</nationalNumberPattern>
-        <exampleNumber>61234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90[0239]\d{5}</nationalNumberPattern>
-        <exampleNumber>90012345</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Luxembourg -->
-    <!-- http://www.ilr.public.lu/communications_electroniques/numerotation/index.html
-         -->
-    <territory id="LU" countryCode="352" internationalPrefix="00"
-        nationalPrefixForParsing="(15(?:0[06]|1[12]|35|4[04]|55|6[26]|77|88|99)\d)"
-        carrierCodeFormattingRule="$CC $FG">
-      <availableFormats>
-        <!-- Patterns overlap because of variable number length. -->
-        <numberFormat pattern="(\d{2})(\d{3})">
-          <leadingDigits>
-            [23-5]|
-            7[1-9]|
-            [89](?:
-              [1-9]|
-              0[2-9]
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>
-            [23-5]|
-            7[1-9]|
-            [89](?:
-              [1-9]|
-              0[2-9]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{3})">
-          <leadingDigits>20</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- The pattern for 7-digit numbers starting with 20 here will never be reached - but since
-             we want this pattern to apply for 8-digit numbers with a 20 prefix, we include 20 in
-             the leading digits. This is also done for 9-10 digit numbers starting with 20 below.
-             -->
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{1,2})">
-          <leadingDigits>
-            2(?:
-              [0367]|
-              4[3-8]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{3})">
-          <leadingDigits>20</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})(\d{1,2})">
-          <leadingDigits>
-            2(?:
-              [0367]|
-              4[3-8]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3 $4 $5</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{1,4})">
-          <leadingDigits>
-            2(?:
-              [12589]|
-              4[12]
-            )|
-            [3-5]|
-            7[1-9]|
-            [89](?:
-              [1-9]|
-              0[2-9]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{3})">
-          <leadingDigits>
-            [89]0[01]|
-            70
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
-          <leadingDigits>6</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <!-- The country-code is an impossible number prefix, so has been excluded here. This is
-             necessary since the numbers have a variable number length. -->
-        <nationalNumberPattern>
-          [24-9]\d{3,10}|
-          3(?:
-            [0-46-9]\d{2,9}|
-            5[013-9]\d{1,8}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Note that numbers starting with 2[367] can be a maximum of 10 digits - all others a
-             maximum of 11. -->
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              2\d{1,2}|
-              3[2-9]|
-              [67]\d|
-              4[1-8]\d?|
-              5[1-5]\d?|
-              9[0-24-9]\d?
-            )|
-            3(?:
-              [059][05-9]|
-              [13]\d|
-              [26][015-9]|
-              4[0-26-9]|
-              7[0-389]|
-              8[08]
-            )\d?|
-            4\d{2,3}|
-            5(?:
-              [01458]\d|
-              [27][0-69]|
-              3[0-3]|
-              [69][0-7]
-            )\d?|
-            7(?:
-              1[019]|
-              2[05-9]|
-              3[05]|
-              [45][07-9]|
-              [679][089]|
-              8[06-9]
-            )\d?|
-            8(?:
-              0[2-9]|
-              1[0-36-9]|
-              3[3-9]|
-              [469]9|
-              [58][7-9]|
-              7[89]
-            )\d?|
-            9(?:
-              0[89]|
-              2[0-49]|
-              37|
-              49|
-              5[0-27-9]|
-              7[7-9]|
-              9[0-478]
-            )\d?
-          )\d{1,7}
-        </nationalNumberPattern>
-        <exampleNumber>27123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>6[269][18]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>628123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90[01]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90012345</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>801\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80112345</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>70\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>70123456</exampleNumber>
-      </personalNumber>
-      <voip>
-        <nationalNumberPattern>20\d{2,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
-        <exampleNumber>2012345</exampleNumber>
-      </voip>
-      <shortCode>
-        <nationalNumberPattern>
-          1(?:
-            1[23]|
-            2\d{3}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,5}</possibleNumberPattern>
-        <exampleNumber>12123</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Latvia -->
-    <!-- http://www.itu.int/oth/T0202000076/en -->
-    <territory id="LV" countryCode="371" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([2689]\d)(\d{3})(\d{3})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2689]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>6\d{7}</nationalNumberPattern>
-        <exampleNumber>61234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>2\d{7}</nationalNumberPattern>
-        <exampleNumber>21234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{6}</nationalNumberPattern>
-        <exampleNumber>80123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90\d{6}</nationalNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Libya (Soc. People’s Libyan Arab Jamahiriya) -->
-    <!-- Status as of 21 Jan 2011: a lot of outdated information on the web including on wikipedia
-         and itu.int. The new area codes are on the Arabic website of the main telecommunication
-         operator (Hatef Libya). A new mobile operator Aljeel Aljadeed for Technology will start
-         using 096 (they are allowing customers to register numbers currently), so their code has
-         also been added. -->
-    <!-- http://hlc.ly/price.php -->
-    <territory id="LY" countryCode="218" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([25679]\d)(\d{7})">
-          <format>$1-$2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[25679]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2[1345]|
-            5[1347]|
-            6[123479]|
-            71
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>212345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>9[12356]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>912345678</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Morocco -->
-    <!-- http://www.itu.int/oth/T0202000090/en -->
-    <!-- http://en.wikipedia.org/wiki/+212 -->
-    <territory id="MA" countryCode="212" internationalPrefix="00"
-      nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([56]\d{2})(\d{6})">
-          <leadingDigits>
-            5(?:
-              2[015-7]|
-              3[0-4]
-            )|
-            6
-          </leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-        <numberFormat pattern="([58]\d{3})(\d{5})">
-          <leadingDigits>
-            5(?:
-              2[2-489]|
-              3[5-9]
-            )|
-            892
-          </leadingDigits>
-          <leadingDigits>
-            5(?:
-              2(?:
-                [2-48]|
-                90
-              )|
-              3(?:
-                [5-79]|
-                80
-              )
-            )|
-            892
-          </leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-        <numberFormat pattern="(5\d{4})(\d{4})">
-          <leadingDigits>
-            5(?:
-              29|
-              38
-            )
-          </leadingDigits>
-          <leadingDigits>
-            5(?:
-              29|
-              38
-            )[89]
-          </leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-        <numberFormat pattern="(8[09])(\d{7})">
-          <leadingDigits>
-            8(?:
-              0|
-              9[013-9]
-            )
-          </leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[5689]\d{8}</nationalNumberPattern>
-        <!-- Closed numbering plan. -->
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          5(?:
-            2(?:
-              (?:
-                [015-7]\d|
-                2[2-9]|
-                3[2-57]|
-                4[2-8]|
-                8[235-9]|
-              )\d|
-              9(?:
-                0\d|
-                [89]0
-              )
-            )|
-            3(?:
-              (?:
-                [0-4]\d|
-                [57][2-9]|
-                6[235-8]|
-                9[3-9]
-              )\d|
-              8(?:
-                0\d|
-                [89]0
-              )
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>520123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          6(?:
-            0[06]|
-            [14-7]\d|
-            2[236]|
-            33|
-            99
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>650123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
-        <exampleNumber>801234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>89\d{7}</nationalNumberPattern>
-        <exampleNumber>891234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Monaco -->
-    <!-- http://www.itu.int/oth/T020200008D/en -->
-    <!-- We support Kosovo mobile numbers (044, 045) with a Monaco country-code here, as we do not
-         support Kosovo at the moment. Kosovo seems to use a variety of country codes currently. -->
-    <territory id="MC" countryCode="377" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- Following formatting found online rather than in the ITU document example. -->
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{3})">
-          <leadingDigits>4</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(6)(\d{2})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>6</leadingDigits>
-          <format>$1 $2 $3 $4 $5</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[4689]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-      </generalDesc>
-      <noInternationalDialling>
-        <nationalNumberPattern>8\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </noInternationalDialling>
-      <fixedLine>
-        <!-- Restricted to this as no numbers with the prefix of 91, 95 or 96 have been found. -->
-        <nationalNumberPattern>9[2-47-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>99123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- 4X mobile numbers are actually used by Kosovo. -->
-        <nationalNumberPattern>
-          6\d{8}|
-          4\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>612345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          (?:
-            8\d|
-            90
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Moldova, Rep. of -->
-    <!-- http://www.itu.int/oth/T020200008C/en -->
-    <territory id="MD" countryCode="373" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(22)(\d{3})(\d{3})">
-          <leadingDigits>22</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([25-7]\d{2})(\d{2})(\d{3})">
-          <leadingDigits>
-            2[13-79]|
-            [5-7]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([89]00)(\d{5})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[256-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              1[0569]|
-              2\d|
-              3[015-7]|
-              4[1-46-9]|
-              5[0-24689]|
-              6[2-589]|
-              7[1-37]|
-              9[1347-9]
-            )|
-            5(?:
-              33|
-              5[257]
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,8}</possibleNumberPattern>
-        <exampleNumber>22212345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Added 688 and 689 since SMS messages have been successfully sent to these numbers. -->
-        <nationalNumberPattern>
-          (?:
-            6(?:
-              50|
-              7[12]|
-              [89]\d
-            )|
-            7(?:
-              80|
-              9\d
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>65012345</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{5}</nationalNumberPattern>
-        <exampleNumber>90012345</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Montenegro -->
-    <territory id="ME" countryCode="382" internationalPrefix="99"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Madagascar -->
-    <!-- http://www.itu.int/oth/T020200007F/en -->
-    <territory id="MG" countryCode="261" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([23]\d)(\d{2})(\d{3})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[23]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Added the prefixes 20 44 and 20 47 as they seem popular on the internet - the plan says
-             20 4 is for the rest of the province of Antanarivo, but then fails to mention any area
-             codes beginning with 4. -->
-        <nationalNumberPattern>
-          2(?:
-            0(?:
-              (?:
-                2\d|
-                4[47]|
-                5[3467]|
-                6[279]|
-                8[268]|
-                9[245]
-              )\d|
-              7(?:
-                2[29]|
-                [35]\d
-              )
-            )|
-            210\d
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>202123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- The numbering plan suggests the third digit, Z, should be 24-9,
-             but this is not borne out by reality. -->
-        <nationalNumberPattern>3[02-4]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>301234567</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Saint-Martin, French Antilles -->
-    <!-- http://www.itu.int/oth/T0202000058/en -->
-    <territory id="MF" countryCode="590" internationalPrefix="00"
-      nationalPrefix="0">
-      <!-- Formatting rules borrowed from Guadeloupe. -->
-      <generalDesc>
-        <nationalNumberPattern>[56]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          590(?:
-            10|
-            2[79]|
-            5[128]|
-            [78]7
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>590271234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          690(?:
-            10|
-            2[27]|
-            66|
-            77|
-            8[78]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>690221234</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Marshall Islands -->
-    <territory id="MH" countryCode="692" internationalPrefix="011"
-               nationalPrefix="1">
-    </territory>
-
-    <!-- Macedonia, Former Yugoslav Rep. of -->
-    <!-- http://en.wikipedia.org/wiki/%2B389
-         http://www.aek.mk/ go to Telecommunications, Numbering, then Numbering plan. -->
-    <territory id="MK" countryCode="389" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- Formats follow wikipedia. -->
-        <numberFormat pattern="(2)(\d{3})(\d{4})">
-          <leadingDigits>2</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([347]\d)(\d{3})(\d{3})">
-          <leadingDigits>[347]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([58]\d{2})(\d)(\d{2})(\d{2})">
-          <leadingDigits>[58]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-578]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              [23]\d|
-              5[125]|
-              61
-            )|
-            3(?:
-              1[3-6]|
-              2[2-6]|
-              3[2-5]|
-              4[235]
-            )|
-            4(?:
-              [23][2-6]|
-              4[3-6]|
-              5[25]|
-              6[25-8]|
-              7[24-6]|
-              8[4-6]
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-        <exampleNumber>22212345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[0-25-8]\d{6}</nationalNumberPattern>
-        <exampleNumber>72345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>5[02-9]\d{6}</nationalNumberPattern>
-        <exampleNumber>50012345</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>
-          8(?:
-            0[1-9]|
-            [1-9]\d
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>80123456</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Mali -->
-    <!-- http://www.itu.int/oth/T0202000083/en -->
-    <!-- http://crt-mali.org/pdf/plan_num -->
-    <territory id="ML" countryCode="223" internationalPrefix="00"
-               nationalPrefix="0">
-      <availableFormats>
-        <numberFormat pattern="([246-8]\d)(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[246-8]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- 20 70 seems a common pattern, in addition to 21 25. -->
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              0(?:
-                2[0-589]|
-                7[027-9]
-              )|
-              1(?:
-                2[5-7]|
-                [3-689]\d
-              )
-            )|
-            442\d
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>20212345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            6(?:
-              [569]\d
-            )|
-            7(?:
-              [08][1-9]|
-              [3579][0-4]|
-              4[014-7]|
-              6\d
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>65012345</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- Online examples have not been found, but this seems to follow the prescriptions in the
-             plan. -->
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Myanmar -->
-    <!-- http://www.itu.int/oth/T0202000092/en -->
-    <territory id="MM" countryCode="95" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(1)(\d{3})(\d{3})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- This overlaps the previous pattern. -->
-        <numberFormat pattern="(1)(3)(33\d)(\d{3})">
-          <leadingDigits>133</leadingDigits>
-          <leadingDigits>1333</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(2)(\d{2})(\d{3})">
-          <leadingDigits>2</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{3})">
-          <leadingDigits>[4-8]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Format is from http://www.aitaa.ait.ac.th/chapters/copy17_of_aitaa-national-chapters-1 -->
-        <numberFormat pattern="(9444)(\d{5})">
-          <leadingDigits>94</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(9)([25689]\d{2})(\d{4})">
-          <leadingDigits>9[25689]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [124-8]\d{5,7}|
-          9\d{7,8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Fixed satellite network numbers (1 3 33X XXX) are also included here. -->
-        <nationalNumberPattern>
-          (?:
-            1\d|
-            2|
-            4[2-6]|
-            5[2-9]|
-            6\d|
-            7[0-5]|
-            8[1-6]
-          )\d{5}|
-          1333\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,8}</possibleNumberPattern>
-        <exampleNumber>1234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          9(?:
-            [25689]\d|
-            444
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-        <exampleNumber>92123456</exampleNumber>
-      </mobile>
-      <!-- No information on other types of phone numbers for Myanmar has been found. -->
-    </territory>
-
-    <!-- Mongolia -->
-    <!-- http://www.itu.int/oth/T020200008E/en -->
-    <territory id="MN" countryCode="976" internationalPrefix="001"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([12]\d)(\d{2})(\d{4})">
-          <leadingDigits>[12]1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([12]2\d)(\d{5,6})">
-          <leadingDigits>[12]2[1-3]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([12]\d{3})(\d{5})">
-          <leadingDigits>
-            [12](?:
-              27|
-              [3-5]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            [12](?:
-              27|
-              [3-5]\d
-            )2
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- It seems from online formatting that the national prefix is not written (or perhaps
-             needed?) for numbers in these ranges. -->
-        <numberFormat pattern="(\d{4})(\d{4})"
-          nationalPrefixFormattingRule="$FG">
-          <leadingDigits>[57-9]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([12]\d{4})(\d{4,5})">
-          <leadingDigits>
-            [12](?:
-              27|
-              [3-5]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            [12](?:
-              27|
-              [3-5]\d
-            )[4-9]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [12]\d{7,9}|
-          [57-9]\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Note the leading digit is the access code: 1 is used by Mongolia Telecom subscribers
-             and 2 is used by Mongolian Railway subscribers. The area code then follows the access
-             code, and could be 1 to 4 digits long. We also cover wireless local loop numbers here
-             as well, even though we are not certain whether they are in fact fixed or mobile in
-             this country. 5-digit subscriber numbers for 4-digit area codes have been added due to
-             online numbers being found. -->
-        <nationalNumberPattern>
-          [12](?:
-            1\d|
-            2(?:
-              [1-3]\d?|
-              7\d
-            )|
-            3[2-8]\d{1,2}|
-            4[2-68]\d{1,2}|
-            5[1-4689]\d{1,2}
-          )\d{5}|
-          (?:
-            5[0568]|
-            70
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>70123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding prefix 98 from numbers found on the internet. -->
-        <nationalNumberPattern>
-          (?:
-            8[89]|
-            9[15689]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>88123456</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-      <voip>
-        <nationalNumberPattern>7[569]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>75123456</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Macao, China -->
-    <!-- http://www.itu.int/oth/T020200007E/en -->
-    <territory id="MO" countryCode="853" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([268]\d{3})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[268]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            28[2-57-9]|
-            8[2-57-9]\d
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>28212345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- The 62 prefix is added as SMS messages have been successfully delivered to these
-             numbers, and they are also widely present on the Internet. -->
-        <nationalNumberPattern>6[26]\d{6}</nationalNumberPattern>
-        <exampleNumber>66123456</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-    </territory>
-
-    <!--  Northern Mariana Islands -->
-    <!-- http://www.itu.int/oth/T02020000EE/en -->
-    <!-- www.cnmiphonebook.com/ -->
-    <territory id="MP" countryCode="1" leadingDigits="670"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[689]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          670(?:
-            2(?:
-              3[3-5]|
-              88|
-              56
-            )|
-            32[23]|
-            4[38]3|
-            532|
-            6(?:
-              64|
-              70|
-              8\d
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>6702345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          670(?:
-            2(?:
-              3[3-5]|
-              88|
-              56
-            )|
-            32[23]|
-            4[38]3|
-            532|
-            6(?:
-              64|
-              70|
-              8\d
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>6702345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Martinique (French Dept. of) -->
-    <territory id="MQ" countryCode="596" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Mauritania -->
-    <!-- http://www.itu.int/oth/T0202000087/en -->
-    <!-- http://www.are.mr/com-1-4-1.html -->
-    <!-- New number plan to be in official use from January 1st 2011. During this change-over
-         period, both the new and the old number plans are supported. -->
-    <territory id="MR" countryCode="222" internationalPrefix="00" >
-      <availableFormats>
-        <numberFormat pattern="([2-48]\d)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[2-48]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="([2-7]\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[2-7]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [2-4]\d{6,7}|
-          [5-7]\d{6}|
-          8\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          5(?:
-            1[035]|
-            2[0-69]|
-            3[0348]|
-            4[468]|
-            5[02-467]|
-            6[39]|
-            7[4-69]
-          )\d{4}|
-          [2-4]5\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>35123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            [23][0-4]|
-            4[3-5]|
-            6\d|
-            7[0-7]
-          )\d{5}|
-          (?:
-            2[27]|
-            3[367]|
-            4[467]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>22123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Montserrat -->
-    <!-- http://www.itu.int/oth/T020200008F/en -->
-    <territory id="MS" countryCode="1" leadingDigits="664"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[689]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>664491\d{4}</nationalNumberPattern>
-        <exampleNumber>6644912345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>664492\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>6644923456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Malta -->
-    <!-- www.itu.int/oth/T0202000084/en -->
-    <!-- www.mca.org.mt (Numbering link in the LHS menu - has more up-to-date allocations) -->
-    <territory id="MT" countryCode="356" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{4})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2579]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2(?:
-            0(?:
-              1[0-6]|
-              [69]\d
-            )|
-            [1-357]\d{2}
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>21001234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            7(?:
-              210|
-              [79]\d{2}|
-            )|
-            9(?:
-              2[13]\d|
-              696|
-              8(?:
-                1[1-3]|
-                89|
-                97
-              )|
-              9\d{2}
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>96961234</exampleNumber>
-      </mobile>
-      <pager>
-        <nationalNumberPattern>7117\d{4}</nationalNumberPattern>
-        <exampleNumber>71171234</exampleNumber>
-      </pager>
-      <premiumRate>
-        <nationalNumberPattern>
-          50(?:
-            0(?:
-              3[1679]|
-              4\d
-            )|
-            [169]\d{2}|
-            7[06]\d
-          )\d{3}
-        </nationalNumberPattern>
-        <exampleNumber>50031234</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Mauritius -->
-    <!-- http://www.itu.int/oth/T0202000088/en - covers mobile only -->
-    <!-- http://www.icta.mu/telecommunications/numbering.htm -->
-    <territory id="MU" countryCode="230" internationalPrefix="0(?:[2-7]0|33)"
-      preferredInternationalPrefix="020">
-      <!-- There is a proposal to change this to 8 digits - this is supposed to happen August 2010,
-           and 7 digit numbers will be phased out by 1 November 2010. Update Aug 9th: Changeover
-           postponed to indeterminate later date. -->
-      <availableFormats>
-        <numberFormat pattern="([2-9]\d{2})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Wireless local loop numbers are considered to be fixed, since there is almost no
-             roaming capability. -->
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              [034789]\d|
-              1[0-8]|
-              2[0-79]
-            )|
-            4(?:
-              [013-8]\d|
-              2[4-7]
-            )|
-            [56]\d{2}|
-            8(?:
-              14|
-              3[129]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>2012345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!--Adding 92 as SMS messages have been successfully sent to this prefix. -->
-        <nationalNumberPattern>
-          (?:
-            25\d|
-            4(?:
-              2[12389]|
-              9\d
-            )|
-            7\d{2}|
-            87[15-7]|
-            9[1-8]\d
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>2512345</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80[012]\d{4}</nationalNumberPattern>
-        <exampleNumber>8001234</exampleNumber>
-      </tollFree>
-      <!-- These may be either shared cost or premium rate - they don't differentiate between these
-           in the plan. This is expected to change with the introduction of the new numbering plan
-           in late 2010 - at that time, this will be updated appropriately. -->
-      <premiumRate>
-        <nationalNumberPattern>30\d{5}</nationalNumberPattern>
-        <exampleNumber>3012345</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Maldives -->
-    <!-- http://www.itu.int/oth/T0202000082/en -->
-    <!-- www.dhiraagu.com.mv -->
-    <territory id="MV" countryCode="960" internationalPrefix="0(?:0|19)"
-      preferredInternationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <format>$1-$2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[3679]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- 300 and 330 have been added as prefixes from online searches, since the numbers seemed
-             to be diallable. -->
-        <nationalNumberPattern>
-          (?:
-            3(?:
-              00|
-              3[0-59]|
-            )|
-            6(?:
-              [567][02468]|
-              8[024689]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>6701234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            7(?:
-              [679]\d|
-              8[02-9]
-            )|
-            9[6-9]\d
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>7712345</exampleNumber>
-      </mobile>
-      <pager>
-        <nationalNumberPattern>781\d{4}</nationalNumberPattern>
-        <exampleNumber>7812345</exampleNumber>
-      </pager>
-      <shortCode>
-        <nationalNumberPattern>
-          1(?:
-            [19]0|
-            23
-          )
-          </nationalNumberPattern>
-        <possibleNumberPattern>\d{3}</possibleNumberPattern>
-        <exampleNumber>123</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Malawi -->
-    <!-- http://www.itu.int/oth/T0202000080/en -->
-    <!-- The plan doesn't state that a national prefix exists, but numbers found on the internet are
-         consistent in having one. -->
-    <territory id="MW" countryCode="265" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d)(\d{3})(\d{3})">
-          <leadingDigits>[13-5]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(2\d{2})(\d{3})(\d{3})">
-          <leadingDigits>2</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{4})(\d{4})">
-          <leadingDigits>7</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{3,4})(\d{3,4})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <!-- According to the plan, the switch from 7 to 9 digits for mobile numbers happened in July
-           2009. However, online numbers don't seem to reflect this - even on the telephone company
-           websites such as www.mw.zain.com. Allowing both for now. -->
-      <generalDesc>
-        <nationalNumberPattern>
-          (?:
-            [13-5]|
-            [27]\d{2}|
-            [89](?:
-              \d{2}
-            )?
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1[2-9]|
-            21\d{2}
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>1234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            [3-5]|
-            77|
-            8(?:
-              8\d
-            )? |
-            9(?:
-              9\d
-            )?
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>991234567</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Mexico -->
-    <!-- http://www.itu.int/oth/T020200008A/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B52 -->
-    <!-- http://en.wikipedia.org/wiki/Premium-rate_telephone_number#Mexico -->
-    <!-- http://en.wikipedia.org/wiki/Toll-free_telephone_number -->
-    <territory id="MX" countryCode="52" internationalPrefix="0[09]"
-               nationalPrefix="01"
-               nationalPrefixForParsing="0[12]|04[45](\d{10})"
-               nationalPrefixTransformRule="1$1"
-               nationalPrefixFormattingRule="$NP $FG">
-      <!-- When a number starts with 01 or 02, we remove the prefixes; when a number starts with 045
-           or 046 followed by 10 digits, we replace the prefixes with 1. This way all the mobile
-           numbers, regardless of whether they are written in international format (leading 1) or
-           national format (leading 045/046), will be parsed into the same form. -->
-      <availableFormats>
-        <numberFormat pattern="([358]\d)(\d{4})(\d{4})">
-          <leadingDigits>
-            33|
-            55|
-            81
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="([358]\d)(\d{4})(\d{4})">
-          <leadingDigits>
-            33|
-            55|
-            81
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            [2467]|
-            3[12457-9]|
-            5[89]|
-            8[02-9]|
-            9[0-35-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            [2467]|
-            3[12457-9]|
-            5[89]|
-            8[02-9]|
-            9[0-35-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="1([358]\d)(\d{4})(\d{4})">
-          <leadingDigits>
-            1(?:
-              33|
-              55|
-              81
-            )
-          </leadingDigits>
-          <format>045 $1 $2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(1)([358]\d)(\d{4})(\d{4})">
-          <leadingDigits>
-            1(?:
-              33|
-              55|
-              81
-            )
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="1(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            1(?:
-              [2467]|
-              3[12457-9]|
-              5[89]|
-              8[2-9]|
-              9[1-35-9]
-            )
-          </leadingDigits>
-          <format>045 $1 $2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(1)(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            1(?:
-              [2467]|
-              3[12457-9]|
-              5[89]|
-              8[2-9]|
-              9[1-35-9]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{9,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- http://en.wikipedia.org/wiki/Area_codes_in_Mexico_by_code -->
-        <nationalNumberPattern>
-          (?:
-            33|
-            55|
-            81
-          )\d{8}|
-          (?:
-            2(?:
-              2[2-9]|
-              3[1-35-8]|
-              4[13-9]|
-              7[1-689]|
-              8[1-58]|
-              9[467]
-            )|
-            3(?:
-              1[1-79]|
-              [2458][1-9]|
-              7[1-8]|
-              9[1-5]
-            )|
-            4(?:
-              1[1-57-9]|
-              [24-6][1-9]|
-              [37][1-8]|
-              8[1-35-9]|
-              9[2-689]
-            )|
-            5(?:
-              88|
-              9[1-79]
-            )|
-            6(?:
-              1[2-68]|
-              [234][1-9]|
-              5[1-3689]|
-              6[12457-9]|
-              7[1-7]|
-              8[67]|
-              9[4-8]
-            )|
-            7(?:
-              [13467][1-9]|
-              2[1-8]|
-              5[13-9]|
-              8[1-69]|
-              9[17]
-            )|
-            8(?:
-              2[13-689]|
-              3[1-6]|
-              4[124-6]|
-              6[1246-9]|
-              7[1-378]|
-              9[12479]
-            )|
-            9(?:
-              1[346-9]|
-              2[1-4]|
-              3[2-46-8]|
-              5[1348]|
-              [69][1-9]|
-              7[12]|
-              8[1-8]
-            )
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-        <exampleNumber>2221234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          1(?:
-            (?:
-              33|
-              55|
-              81
-            )\d{8}|
-            (?:
-              2(?:
-                2[2-9]|
-                3[1-35-8]|
-                4[13-9]|
-                7[1-689]|
-                8[1-58]|
-                9[467]
-              )|
-              3(?:
-                1[1-79]|
-                [2458][1-9]|
-                7[1-8]|
-                9[1-5]
-              )|
-              4(?:
-                1[1-57-9]|
-                [24-6][1-9]|
-                [37][1-8]|
-                8[1-35-9]|
-                9[2-689]
-              )|
-              5(?:
-                88|
-                9[1-79]
-              )|
-              6(?:
-                1[2-68]|
-                [2-4][1-9]|
-                5[1-3689]|
-                6[12457-9]|
-                7[1-7]|
-                8[67]|
-                9[4-8]
-              )|
-              7(?:
-                [13467][1-9]|
-                2[1-8]|
-                5[13-9]|
-                8[1-69]|
-                9[17]
-              )|
-              8(?:
-                2[13-689]|
-                3[1-6]|
-                4[124-6]|
-                6[1246-9]|
-                7[1-378]|
-                9[12479]
-              )|
-              9(?:
-                1[346-9]|
-                2[1-4]|
-                3[2-46-8]|
-                5[1348]|
-                [69][1-9]|
-                7[12]|
-                8[1-8]
-              )
-            )\d{7}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>12221234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9001234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Malaysia -->
-    <!-- http://en.wikipedia.org/wiki/%2B60 -->
-    <!-- http://www.skmm.gov.my/what_we_do/numbering/index.asp -->
-    <territory id="MY" countryCode="60" internationalPrefix="00"
-               nationalPrefix="0">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="([4-79])(\d{3})(\d{4})">
-          <leadingDigits>[4-79]</leadingDigits>
-          <format>$1-$2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(3)(\d{4})(\d{4})">
-          <leadingDigits>3</leadingDigits>
-          <format>$1-$2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="([18]\d)(\d{3})(\d{3,4})">
-          <leadingDigits>
-            1[0-46-9][1-9]|
-            8
-          </leadingDigits>
-          <format>$1-$2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(1)([36-8]00)(\d{2})(\d{4})">
-          <leadingDigits>1[36-8]0</leadingDigits>
-          <format>$1-$2-$3-$4</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(154)(\d{3})(\d{4})">
-          <leadingDigits>15</leadingDigits>
-          <format>$1-$2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[13-9]\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            3\d{2}|
-            [4-79]\d|
-            8[2-9]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>312345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>1[0-46-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>123456789</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>1[38]00\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1300123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>1600\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1600123456</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <nationalNumberPattern>1700\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1700123456</exampleNumber>
-      </personalNumber>
-      <voip>
-        <nationalNumberPattern>154\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1541234567</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Mozambique -->
-    <!-- http://www.itu.int/oth/T0202000091/en -->
-    <territory id="MZ" countryCode="258" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([28]\d)(\d{3})(\d{3,4})">
-          <leadingDigits>
-            2|
-            8[24]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(80\d)(\d{3})(\d{3})">
-          <leadingDigits>80</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[28]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2(?:
-            [1346]\d|
-            5[0-2]|
-            [78][12]|
-            93
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>21123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>8[24]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>821234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- Unsure of the length requirement on toll-free numbers, so using 9
-        based on online examples. -->
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <!-- The plan suggests 801 and 802 numbers are shared-cost numbers, and numbers beginning with
-           a 9 are premium rate, but no online examples can be found of any of these so they are
-           omitted for the time-being. -->
-    </territory>
-
-    <!-- Namibia -->
-    <!-- http://www.itu.int/oth/T0202000093/en -->
-    <territory id="NA" countryCode="264" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(8\d)(\d{3})(\d{4})">
-          <leadingDigits>8[125]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(6\d)(\d{2,3})(\d{4})">
-          <leadingDigits>6</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(88)(\d{3})(\d{3})">
-          <leadingDigits>88</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(870)(\d{3})(\d{3})">
-          <leadingDigits>870</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[68]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Includes VSAT service. -->
-        <nationalNumberPattern>
-          6(?:
-            1(?:
-              17|
-              2(?:
-                [0189]\d|
-                [23-6]|
-                7\d?
-              )|
-              3(?:
-                2\d|
-                3[378]
-              )|
-              4[01]|
-              69|
-              7[014]
-            )|
-            2(?:
-              17|
-              25|
-              5(?:
-                [0-36-8]|
-                4\d?
-              )|
-              69|
-              70
-            )|
-            3(?:
-              17|
-              2(?:
-                [0237]\d?|
-                [14-689]
-              )|
-              34|
-              6[29]|
-              7[01]|
-              81
-            )|
-            4(?:
-              17|
-              2(?:
-                [012]|
-                7?
-              )|
-              4(?:
-                [06]|
-                1\d
-              )|
-              5(?:
-                [01357]|
-                [25]\d?
-              )|
-              69|
-              7[01]
-            )|
-            5(?:
-              17|
-              2(?:
-                [0459]|
-                [23678]\d?
-              )|
-              69|
-              7[01]
-            )|
-            6(?:
-              17|
-              2(?:
-                5|
-                6\d?
-              )|
-              38|
-              42|
-              69|
-              7[01]
-            )|
-            7(?:
-              17|
-              2(?:
-                [569]|
-                [234]\d?
-              )|
-              3(?:
-                0\d?|
-                [13]
-              )|
-              69|
-              7[01]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>612012345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Includes the Switch CDMA Service. -->
-        <nationalNumberPattern>
-          (?:
-            60|
-            8[125]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>811234567</exampleNumber>
-      </mobile>
-      <premiumRate>
-        <nationalNumberPattern>8701\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>870123456</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>886\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>88612345</exampleNumber>
-      </voip>
-      <shortCode>
-        <nationalNumberPattern>
-          1(?:
-            0111|
-            \d{3}
-          )|
-          9(?:
-            3111|
-            \d{2}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,5}</possibleNumberPattern>
-        <exampleNumber>93111</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- New Caledonia (Territoire français d'outre-mer) -->
-    <territory id="NC" countryCode="687" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Niger -->
-    <!-- http://www.itu.int/oth/T020200009B/en -->
-    <territory id="NE" countryCode="227" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([029]\d)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>
-            [29]|
-            09
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(08)(\d{3})(\d{3})">
-          <leadingDigits>08</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[029]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Adding 20 61 from online numbers. -->
-        <nationalNumberPattern>
-          2(?:
-            0(?:
-              20|
-              3[1-7]|
-              4[134]|
-              5[14]|
-              6[14578]|
-              7[1-578]
-            )|
-            1(?:
-              4[145]|
-              5[14]|
-              6[14-68]|
-              7[169]|
-              88
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>20201234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Added 90 and 97 from online data. Zain have confirmed that they use the 97 prefix. -->
-        <nationalNumberPattern>9[03467]\d{6}</nationalNumberPattern>
-        <exampleNumber>93123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>08\d{6}</nationalNumberPattern>
-        <exampleNumber>08123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>09\d{6}</nationalNumberPattern>
-        <exampleNumber>09123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Norfolk Island -->
-    <territory id="NF" countryCode="672" internationalPrefix="00">
-    </territory>
-
-    <!-- Nigeria -->
-    <!-- http://www.itu.int/oth/T020200009C/en -->
-    <territory id="NG" countryCode="234" internationalPrefix="009"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([129])(\d{3})(\d{3,4})">
-          <leadingDigits>[129]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([3-8]\d)(\d{3})(\d{2,3})">
-          <leadingDigits>
-            [3-6]|
-            7(?:
-              [1-79]|
-              0[1-9]
-            )|
-            8[2-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([78]\d{2})(\d{3})(\d{3,4})">
-          <leadingDigits>
-            70|
-            8[01]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([78]00)(\d{4})(\d{4,5})">
-          <leadingDigits>[78]00</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([78]00)(\d{5})(\d{5,6})">
-          <leadingDigits>[78]00</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(78)(\d{2})(\d{3})">
-          <leadingDigits>78</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [1-69]\d{5,8}|
-          [78]\d{5,13}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,14}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          [12]\d{6,7}|
-          9\d{7}|
-          (?:
-            4[023568]|
-            5[02368]|
-            6[02-469]|
-            7[569]|
-            8[2-9]
-          )\d{6}|
-          (?:
-            4[47]|
-            5[14579]|
-            6[1578]|
-            7[0-357]
-          )\d{5,6}|
-          (?:
-            78|
-            41
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-        <exampleNumber>12345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- More 81X prefixes have been added based on online numbers. -->
-        <nationalNumberPattern>
-          (?:
-            70(?:
-              [3-9]\d|
-              2[1-9]
-            )|
-            8(?:
-              0[2-9]|
-              1[23689]
-            )\d
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8021234567</exampleNumber>
-      </mobile>
-      <!-- Info on these numbers from http://www.alphatechnologieslimited.com. -->
-      <tollFree>
-        <nationalNumberPattern>800\d{7,11}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,14}</possibleNumberPattern>
-        <exampleNumber>80017591759</exampleNumber>
-      </tollFree>
-      <personalNumber>
-        <nationalNumberPattern>700\d{7,11}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,14}</possibleNumberPattern>
-        <exampleNumber>7001234567</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Nicaragua -->
-    <territory id="NI" countryCode="505" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Netherlands -->
-    <!-- http://en.wikipedia.org/wiki/%2B31 -->
-    <!-- http://www2.opta.nl/asp/en/numbers/ -->
-    <territory id="NL" countryCode="31" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([1-578]\d)(\d{3})(\d{4})">
-          <leadingDigits>
-            1[035]|
-            2[0346]|
-            3[03568]|
-            4[0356]|
-            5[0358]|
-            7|
-            8[458]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([1-5]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>
-            1[16-8]|
-            2[259]|
-            3[124]|
-            4[17-9]|
-            5[124679]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(6)(\d{8})">
-          <leadingDigits>6</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([89]0\d)(\d{4,7})">
-          <leadingDigits>
-            80|
-            9
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{6,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1[0135-8]|
-            2[02-69]|
-            3[0-68]|
-            4[0135-9]|
-            [57]\d|
-            8[478]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>101234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>6[1-58]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>612345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{4,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-        <exampleNumber>8001234</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90[069]\d{4,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-        <exampleNumber>9001234</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>85\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </voip>
-    </territory>
-
-    <!-- Norway -->
-    <!--
-    http://www.npt.no/portal/page/portal/PG_NPT_NO_EN/PAG_NPT_EN_HOME/PAG_RESOURCE_TEXT -->
-    <territory id="NO" countryCode="47" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([489]\d{2})(\d{2})(\d{3})">
-          <leadingDigits>[489]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([235-7]\d)(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[235-7]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          0\d{4}|
-          [2-9]\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5}(?:\d{3})?</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Includes some 810 local-rate numbers, and long-distance rate numbers, as well as the
-             5-digit country-wide numbers used by businesses that begin with 0. -->
-        <nationalNumberPattern>
-          0\d{4}|
-          (?:
-            2[1-4]|
-            3[1-3578]|
-            5[1-35-7]|
-            6[1-4679]|
-            7\d
-          )\d{6}|
-          81(?:
-            0(?:
-              0[7-9]|
-              1\d
-            )|
-            5\d{2}
-          )\d{3}
-        </nationalNumberPattern>
-        <exampleNumber>21234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            4[015-8]|
-            9\d
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>41234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80[01]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>82[09]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>82012345</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>
-          810(?:
-            0[0-6]|
-            [2-8]\d
-          )\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>81021234</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>880\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>88012345</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Nepal -->
-    <!-- http://www.itu.int/oth/T0202000095/en -->
-    <!-- http://www.ntc.net.np/mobile/mob_postpaid_number_scheme.php -->
-    <territory id="NP" countryCode="977" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(1)([4-6]\d{3})(\d{3})">
-          <leadingDigits>1[4-6]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{3})">
-          <leadingDigits>
-            1[01]|
-            [2-8]|
-            9[1-79]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Format is from http://www.fco.gov.uk/en/travel-and-living-abroad/travel-advice-by-country/country-profile/asia-oceania/nepal/ -->
-        <numberFormat pattern="(98[45])(\d{3})(\d{4})">
-          <leadingDigits>98</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [1-8]\d{5,7}|
-          98[45]\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1[014-6]|
-            2[13-79]|
-            3[135-8]|
-            4[146-9]|
-            5[135-7]|
-            6[13-9]|
-            7[15-9]|
-            8[1-4679]|
-            9[1-79]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-        <exampleNumber>14567890</exampleNumber>
-      </fixedLine>
-      <!-- There is no definitive source of information for mobile numbers in Nepal. The infomation
-           here is collected by searching the Internet. -->
-      <mobile>
-        <nationalNumberPattern>98[45]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9841234567</exampleNumber>
-      </mobile>
-      <!-- No information on other types of phone numbers for Nepal has been found. -->
-    </territory>
-
-    <!-- Nauru -->
-    <territory id="NR" countryCode="674" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Niue -->
-    <!-- http://www.itu.int/oth/T02020000EC/en -->
-    <territory id="NU" countryCode="683" internationalPrefix="00">
-      <!-- Numbers are always formatted as a block. -->
-      <generalDesc>
-        <nationalNumberPattern>[1-5]\d{3}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Putting FWT (fixed-wireless-terminals) numbers here too. -->
-        <nationalNumberPattern>[34]\d{3}</nationalNumberPattern>
-        <exampleNumber>4002</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[125]\d{3}</nationalNumberPattern>
-        <exampleNumber>1234</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- New Zealand -->
-    <!-- http://www.itu.int/oth/T0202000099/en -->
-    <!-- Includes Ross Dependency, Antarctica -->
-    <!-- Does not currently support 083 "Enhanced voice services", New Zealand direct service
-         numbers and 050 "Nation-Wide Service". -->
-    <territory id="NZ" countryCode="64" internationalPrefix="0(?:0|161)"
-               preferredInternationalPrefix="00" nationalPrefix="0"
-               nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([34679])(\d{3})(\d{4})">
-          <leadingDigits>
-            [3467]|
-            9[1-9]
-          </leadingDigits>
-          <format>$1-$2 $3</format>
-        </numberFormat>
-        <!-- Mobile numbers do not have exclusive leading digits - formatting depends on number
-             length. -->
-        <!-- Vodafone numbers are formatted with 021 separated. -->
-        <numberFormat pattern="(21)(\d{4})(\d{3,4})">
-          <leadingDigits>21</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Adding in the toll free numbers here as well since they follow the same format. -->
-        <numberFormat pattern="([2589]\d{2})(\d{3})(\d{3,4})">
-          <leadingDigits>
-            2[0247-9]|
-            5|
-            [89]00
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Vodafone and Orcon numbers can also be 8 digits (without leading 0), and these are
-             formatted differently. -->
-        <numberFormat pattern="(\d{2})(\d{3})(\d{3,4})">
-          <leadingDigits>2[0169]|86</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Antarctica -->
-        <numberFormat pattern="(24099)(\d{3})">
-          <leadingDigits>240</leadingDigits>
-          <leadingDigits>2409</leadingDigits>
-          <leadingDigits>24099</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          6[235-9]\d{6}|
-          [2-57-9]\d{7,10}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            3[2-79]|
-            [49][2-689]|
-            6[235-9]|
-            7[2-589]
-          )\d{6}|
-          24099\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>32345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Includes mobile radio service numbers. -->
-        <nationalNumberPattern>
-          2(?:
-            [079]\d{7}|
-            1(?:
-              0\d{5,7}|
-              [12]\d{5,6}|
-              [3-9]\d{5}
-            )|
-            [28]\d{7,8}|
-            4[1-9]\d{6}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-        <exampleNumber>211234567</exampleNumber>
-      </mobile>
-      <pager>
-          <nationalNumberPattern>[28]6\d{6,7}</nationalNumberPattern>
-          <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-          <exampleNumber>26123456</exampleNumber>
-      </pager>
-      <!-- These are the toll free patterns used, by Telecom and Telstra/Clear, but they are
-           referred to as 'Value-added service' in the phone plan for some reason. 85 numbers are
-           not covered, as telecom companies don't seem to support them yet. -->
-      <tollFree>
-        <nationalNumberPattern>
-          508\d{6,7}|
-          80\d{6,8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,11}</possibleNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Oman -->
-    <!-- http://www.itu.int/oth/T020200009F/en -->
-    <territory id="OM" countryCode="968" internationalPrefix="00" >
-      <availableFormats>
-        <numberFormat pattern="(2\d)(\d{6})">
-          <leadingDigits>2</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(9\d{3})(\d{4})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([58]00)(\d{4,6})">
-          <leadingDigits>[58]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          (?:
-            2[3-6]|
-            5|
-            9[2-9]
-          )\d{6}|
-          800\d{5,6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>2[3-6]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>23123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>9[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>92123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- Link to document about toll-free numbers on www.tra.gov.om, which suggests they should
-             be 8007 followed by 4 digits. However, the only examples I can find, including the
-             customer help line for the main telephony company there (omantel), is 8007 followed by
-             5 digits, so am allowing both for now to be on the safe side. 500 numbers seem to offer
-             international toll-free dialing numbers - +968 500 1300 for international help desk for
-             omantel, for example. -->
-        <nationalNumberPattern>
-          8007\d{4,5}|
-          500\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-        <exampleNumber>80071234</exampleNumber>
-      </tollFree>
-      <!-- No premiumRate information can be found. -->
-    </territory>
-
-    <!-- Panama -->
-    <territory id="PA" countryCode="507" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Peru -->
-    <!-- http://www.itu.int/oth/T02020000A6/en -->
-    <!-- http://en.wikipedia.org/wiki/+51 -->
-    <territory id="PE" countryCode="51" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="($FG)"
-               preferredExtnPrefix=" Anexo ">
-      <availableFormats>
-        <numberFormat pattern="(1)(\d{7})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([4-8]\d)(\d{6})">
-          <leadingDigits>[4-8]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- Formatting from common usage found on the internet, supported by ITU doc. -->
-        <numberFormat pattern="(9\d{2})(\d{3})(\d{3})"
-                      nationalPrefixFormattingRule="$FG">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[14-9]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1\d|
-            4[1-4]|
-            5[1-46]|
-            6[1-7]|
-            7[2-46]|
-            8[2-4]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-        <exampleNumber>11234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>9\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>912345678</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- French Polynesia (Tahiti) (Territoire français d'outre-mer) -->
-    <territory id="PF" countryCode="689" internationalPrefix="00">
-    </territory>
-
-    <!-- Papua New Guinea -->
-    <!-- http://www.itu.int/oth/T02020000A4/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B675 -->
-    <territory id="PG" countryCode="675" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <leadingDigits>[1-689]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(7[1-36]\d)(\d{2})(\d{3})">
-          <leadingDigits>7[1-36]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Fixed line patterns are from the numbering plan, with additions for 4XX since many
-             numbers in the yellow pages seem to be outside the 47X range prescribed by the plan.
-             The same applies to extra 64X numbers. -->
-        <nationalNumberPattern>
-          (?:
-            3\d{2}|
-            4[257]\d|
-            5[34]\d|
-            6(?:
-              29|
-              4[1-9]
-            )|
-            85[02-46-9]|
-            9[78]\d
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>3123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Mobile number patterns from the numbering plan are included here,
-        as well as 68x from wikipedia. -->
-        <nationalNumberPattern>
-          (?:
-            68|
-            7(?:
-              [126]\d|
-              3[1-9]
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>6812345</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>180\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>1801234</exampleNumber>
-      </tollFree>
-      <voip>
-        <!-- VSAT prefixes are here. -->
-        <nationalNumberPattern>275\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>2751234</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Philippines -->
-    <!-- http://en.wikipedia.org/wiki/%2B63 -->
-    <territory id="PH" countryCode="63" internationalPrefix="00"
-               nationalPrefix="0">
-      <availableFormats>
-        <!--Area code separated from number. Area codes found here:
-        http://en.wikipedia.org/wiki/Telecommunications_in_the_Philippines#Area_Codes -->
-        <numberFormat nationalPrefixFormattingRule="($NP$FG)"
-          pattern="(2)(\d{3})(\d{4})">
-          <leadingDigits>2</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="($NP$FG)"
-          pattern="(\d{4})(\d{5})">
-          <leadingDigits>
-            3(?:
-              23|
-              39|
-              46
-            )|
-            4(?:
-              2[3-6]|
-              [35]9|
-              4[26]|
-              76
-            )|
-            5(?:
-              22|
-              44
-            )|
-            642|
-            8(?:
-              62|
-              8[245]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            3(?:
-              230|
-              397|
-              461
-            )|
-            4(?:
-              2(?:
-                35|
-                [46]4|
-                51
-              )|
-              396|
-              4(?:
-                22|
-                63
-              )|
-              59[347]|
-              76[15]
-            )|
-            5(?:
-              221|
-              446
-            )|
-            642[23]|
-            8(?:
-              622|
-              8(?:
-                [24]2|
-                5[13]
-              )
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="($NP$FG)"
-          pattern="(\d{5})(\d{4})">
-          <leadingDigits>
-            346|
-            4(?:
-              27|
-              9[35]
-            )|
-            883
-          </leadingDigits>
-          <leadingDigits>
-            3469|
-            4(?:
-              279|
-              9(?:
-                30|
-                56
-              )
-            )|
-            8834
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- This rule is a fallback for the more specific area codes. -->
-        <numberFormat nationalPrefixFormattingRule="($NP$FG)"
-          pattern="([3-8]\d)(\d{3})(\d{4})">
-          <leadingDigits>[3-8]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG"
-          pattern="(9\d{2})(\d{3})(\d{4})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Formatting from http://www.uniontelecard.com/calling-guides/philippines/guide1.aspx -->
-        <numberFormat pattern="(1800)(\d{3})(\d{4})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(1800)(\d{1,2})(\d{3})(\d{4})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [2-9]\d{7,9}|
-          1800\d{7,9}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,13}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2|
-            3[2-68]|
-            4[2-9]|
-            5[2-6]|
-            6[2-58]|
-            7[24578]|
-            8[2-8]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-        <exampleNumber>21234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          9(?:
-            0[5-9]|
-            1[025-9]|
-            2[0-36-9]|
-            3[0235-9]|
-            7[349]|
-            [89]9
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9051234567</exampleNumber>
-      </mobile>
-      <!-- Information on toll-free numbers collected from searching the internet -->
-      <tollFree>
-        <nationalNumberPattern>1800\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11,13}</possibleNumberPattern>
-        <exampleNumber>180012345678</exampleNumber>
-      </tollFree>
-      <!-- No information can be found about other types of numbers (such as premium rate) in the
-           Philippines. -->
-    </territory>
-
-    <!-- Pakistan -->
-    <!-- http://www.itu.int/oth/T02020000A1/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B92 -->
-    <territory id="PK" countryCode="92" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)">
-      <availableFormats>
-        <!-- Universal Access Numbers (UAN) number format patterns first, so that these numbers are
-             formatted nicely by the AYTF. -->
-        <numberFormat pattern="(\d{2})(111)(\d{3})(\d{3})">
-          <leadingDigits>
-            (?:
-              2[125]|
-              4[0-246-9]|
-              5[1-35-7]|
-              6[1-8]|
-              7[14]|
-              8[16]|
-              91
-            )1
-          </leadingDigits>
-          <leadingDigits>
-            (?:
-              2[125]|
-              4[0-246-9]|
-              5[1-35-7]|
-              6[1-8]|
-              7[14]|
-              8[16]|
-              91
-            )11
-          </leadingDigits>
-          <leadingDigits>
-            (?:
-              2[125]|
-              4[0-246-9]|
-              5[1-35-7]|
-              6[1-8]|
-              7[14]|
-              8[16]|
-              91
-            )111
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(111)(\d{3})(\d{3})">
-          <leadingDigits>
-            2[349]|
-            45|
-            54|
-            60|
-            72|
-            8[2-5]|
-            9[2-9]
-          </leadingDigits>
-          <leadingDigits>
-            (?:
-              2[349]|
-              45|
-              54|
-              60|
-              72|
-              8[2-5]|
-              9[2-9]
-            )\d1
-          </leadingDigits>
-          <leadingDigits>
-            (?:
-              2[349]|
-              45|
-              54|
-              60|
-              72|
-              8[2-5]|
-              9[2-9]
-            )\d11
-          </leadingDigits>
-          <leadingDigits>
-            (?:
-              2[349]|
-              45|
-              54|
-              60|
-              72|
-              8[2-5]|
-              9[2-9]
-            )\d111
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{7,8})">
-          <leadingDigits>
-            (?:
-              2[125]|
-              4[0-246-9]|
-              5[1-35-7]|
-              6[1-8]|
-              7[14]|
-              8[16]|
-              91
-            )[2-9]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{6,7})">
-          <leadingDigits>
-            2[349]|
-            45|
-            54|
-            60|
-            72|
-            8[2-5]|
-            9[2-9]
-          </leadingDigits>
-          <leadingDigits>
-            (?:
-              2[349]|
-              45|
-              54|
-              60|
-              72|
-              8[2-5]|
-              9[2-9]
-            )\d[2-9]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(3\d{2})(\d{7})" nationalPrefixFormattingRule="$NP$FG">
-          <leadingDigits>3</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([15]\d{3})(\d{5,6})">
-          <leadingDigits>
-            58[12]|
-            1
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- This is from online examples. -->
-        <numberFormat pattern="(586\d{2})(\d{5})">
-          <leadingDigits>586</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([89]00)(\d{3})(\d{2})" nationalPrefixFormattingRule="$NP$FG">
-          <leadingDigits>[89]00</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <!-- This is horribly complex because the country code is 92, and several area codes start
-             with 92, and the number length is widely variable. -->
-        <nationalNumberPattern>
-          1\d{8}|
-          [2-8]\d{5,11}|
-          9(?:
-            [013-9]\d{4,9}|
-            2\d(?:
-              111\d{6}|
-              \d{3,7}
-            )
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,12}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- The subscriber number length is not well defined for some area codes. From online
-             examples, we have come up with a heuristic that for 3-digit area codes, the subscriber
-             number will be 6 or 7 digits - for 2-digit area codes it will be 7, with the exceptions
-             of Karachi and Lahore (both 8). -->
-        <nationalNumberPattern>
-          (?:
-            21|
-            42
-          )[2-9]\d{7}|
-          (?:
-            2[25]|
-            4[0146-9]|
-            5[1-35-7]|
-            6[1-8]|
-            7[14]|
-            8[16]|
-            91
-          )[2-9]\d{6}|
-          (?:
-            2(?:
-              3[2358]|
-              4[2-4]|
-              9[2-8]
-            )|
-            45[3479]|
-            54[2-467]|
-            60[468]|
-            72[236]|
-            8(?:
-              2[2-689]|
-              3[23578]|
-              4[3478]|
-              5[2356]
-            )|
-            9(?:
-              1|
-              2[2-8]|
-              3[27-9]|
-              4[2-6]|
-              6[3569]|
-              9[25-8]
-            )
-          )[2-9]\d{5,6}|
-          58[126]\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-        <exampleNumber>2123456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          3(?:
-            0\d|
-            1[2-5]|
-            2[1-3]|
-            3[1-6]|
-            4[2-6]|
-            64
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>3012345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90012345</exampleNumber>
-      </premiumRate>
-      <!-- These are referred to as UPT numbers in the plan. -->
-      <personalNumber>
-        <nationalNumberPattern>122\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <!-- The example number here is the test number from the plan. -->
-        <exampleNumber>122044444</exampleNumber>
-      </personalNumber>
-      <uan>
-        <!-- Data on what a UAN is is hard to come by. http://www.ptcl.com.pk has information under
-             http://www.ptcl.com.pk/contentb.php?NID=143#uan - which defines their format - but not
-             what type of number they are.  We exclude Azad Jammu, Kashmir and Northern Areas here
-             since no online example UANs can be found, and they have an "access code" at the start,
-             making it difficult to guess what a UAN in these areas would look like. -->
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              [125]|
-              3[2358]|
-              4[2-4]|
-              9[2-8]
-            )|
-            4(?:
-              [0-246-9]|
-              5[3479]
-            )|
-            5(?:
-              [1-35-7]|
-              4[2-467]
-            )|
-            6(?:
-              [1-8]|
-              0[468]
-            )|
-            7(?:
-              [14]|
-              2[236]
-            )|
-            8(?:
-              [16]|
-              2[2-689]|
-              3[23578]|
-              4[3478]|
-              5[2356]
-            )|
-            9(?:
-              1|
-              22|
-              3[27-9]|
-              4[2-6]|
-              6[3569]|
-              9[2-7]
-            )
-          )111\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{11,12}</possibleNumberPattern>
-        <exampleNumber>21111825888</exampleNumber>
-      </uan>
-    </territory>
-
-    <!-- Poland -->
-    <!-- http://en.wikipedia.org/wiki/%2B48 -->
-    <!--
-    http://www.uke.gov.pl/uke/index.jsp?place=Lead24&news_cat_id=277&news_id=3791&layout=9&page=text
-    (in Polish) -->
-    <territory id="PL" countryCode="48" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>
-            [124]|
-            3[2-4]|
-            5[24-689]|
-            6[1-3578]|
-            7[14-7]|
-            8[1-79]|
-            9[145]
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <!-- We are formatting 70 numbers as per mobile numbers, based on information from some
-             Poles that this is more usual. -->
-        <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
-          <leadingDigits>
-            39|
-            5[013]|
-            6[069]|
-            7[0289]|
-            8[08]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1[2-8]|
-            2[2-59]|
-            3[2-4]|
-            4[1-468]|
-            5[24-689]|
-            6[1-3578]|
-            7[14-7]|
-            8[1-79]|
-            9[145]
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>123456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            5[013]|
-            6[069]|
-            7[289]|
-            88
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>512345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>70\d{7}</nationalNumberPattern>
-        <exampleNumber>701234567</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>801\d{6}</nationalNumberPattern>
-        <exampleNumber>801234567</exampleNumber>
-      </sharedCost>
-      <voip>
-        <nationalNumberPattern>39\d{7}</nationalNumberPattern>
-        <exampleNumber>391234567</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Saint Pierre and Miquelon (Collectivité territoriale de la République française) -->
-    <territory id="PM" countryCode="508" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Puerto Rico -->
-    <!-- http://www.itu.int/oth/T02020000AA/en -->
-    <territory id="PR" countryCode="1" leadingDigits="787|939"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[789]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            787|
-            939
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>7872345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            787|
-            939
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>7872345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002345678</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Palestinian Authority -->
-    <!-- http://en.wikipedia.org/wiki/%2B970 -->
-    <!-- http://www.wtng.info/wtng-970-ps.html -->
-    <!-- http://www.paltel.ps -->
-    <!-- Palestinian phone numbers can be reached through the Israeli country code (972) in addition
-         to the Palestinian country code (970) and so Palestinian landlines and mobile lines are a
-         subset of the Israeli formats. -->
-    <territory id="PS" countryCode="970" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([2489])(2\d{2})(\d{4})">
-          <leadingDigits>[2489]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(5[69]\d)(\d{3})(\d{3})">
-          <leadingDigits>5</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="(1[78]00)(\d{3})(\d{3})">
-          <leadingDigits>1[78]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- 4 and 5 digit premium numbers will be formatted as one block by default. -->
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [24589]\d{7,8}|
-          1(?:
-            [78]\d{8}|
-            [49]\d{2,3}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            22[234789]|
-            42[45]|
-            82[01458]|
-            92[369]
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>22234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>5[69]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>599123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>1800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <!-- According to Paltel, premium numbers are 14xx and 19xxx -->
-        <nationalNumberPattern>
-          1(?:
-            4|
-            9\d
-           )\d{2}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{4,5}</possibleNumberPattern>
-        <exampleNumber>19123</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>1700\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1700123456</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Portugal -->
-    <!-- http://www.anacom.pt/render.jsp?categoryId=279098 -->
-    <territory id="PT" countryCode="351" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([2-46-9]\d{2})(\d{3})(\d{3})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-46-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          2(?:
-            [12]\d|
-            [35][1-689]|
-            4[1-59]|
-            6[1-35689]|
-            7[1-9]|
-            8[1-69]|
-            9[1256]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>212345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          9(?:
-            [136]\d{2}|
-            2[124-79]\d|
-            4(?:
-              80|
-              9\d
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>912345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          4\d{8}|
-          80[02]\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>71\d{7}</nationalNumberPattern>
-        <exampleNumber>712345678</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>808\d{6}</nationalNumberPattern>
-        <exampleNumber>808123456</exampleNumber>
-      </sharedCost>
-      <voip>
-        <nationalNumberPattern>30\d{7}</nationalNumberPattern>
-        <exampleNumber>301234567</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Palau -->
-    <territory id="PW" countryCode="680" internationalPrefix="011">
-    </territory>
-
-    <!-- Paraguay -->
-    <territory id="PY" countryCode="595" internationalPrefix="002"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Qatar -->
-    <!-- http://www.itu.int/oth/T02020000AB/en -->
-    <!-- http://wtng.info/wtng-qq.html -->
-    <territory id="QA" countryCode="974" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(8\d{2})(\d{4})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([3-7]\d{3})(\d{4})">
-          <leadingDigits>[3-7]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[3-8]\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>44\d{6}</nationalNumberPattern>
-        <exampleNumber>44123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            33|
-            55|
-            66|
-            77
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>33123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{4}</nationalNumberPattern>
-        <exampleNumber>8001234</exampleNumber>
-      </tollFree>
-      <!-- No premiumRate information can be found. -->
-    </territory>
-
-    <!-- Réunion (French Departments and Territories in the Indian Ocean) -->
-    <!-- Note this shares the same country code as La Mayotte and French Southern Territories, and
-         the formatting patterns here are used by all of them. -->
-    <!-- http://www.itu.int/oth/T020200004B/en -->
-    <territory id="RE" countryCode="262" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"
-               leadingDigits="262|6[49]|8" mainCountryForCode="true" >
-      <availableFormats>
-        <numberFormat pattern="([268]\d{2})(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[268]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- 0876 numbers are mentioned in the plan, but none in use can be found. -->
-        <nationalNumberPattern>262\d{6}</nationalNumberPattern>
-        <exampleNumber>262161234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          6(?:
-            9[23]|
-            47
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>692123456</exampleNumber>
-      </mobile>
-      <!-- 08* Numbers in Réunion are the same as those valid in France. -->
-      <tollFree>
-        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
-        <exampleNumber>801234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>89[1-37-9]\d{6}</nationalNumberPattern>
-        <exampleNumber>891123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>
-          8(?:
-            1[019]|
-            2[0156]|
-            84|
-            90
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>810123456</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Romania -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000AC0001MSWE.doc -->
-    <!-- http://en.wikipedia.org/wiki/Romania_telephone_area_codes -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Romania -->
-    <!-- Extension prefix found online, confirmed by a Romanian. -->
-    <territory id="RO" countryCode="40" internationalPrefix="00"
-      nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"
-      preferredExtnPrefix=" int ">
-      <availableFormats>
-        <numberFormat pattern="([237]\d)(\d{3})(\d{4})">
-          <leadingDigits>
-            [23]1|
-            7
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
-          <leadingDigits>
-            [23][02-9]|
-            [89]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[237-9]\d{8}</nationalNumberPattern>
-        <!-- Although the ITU plan says the number plan is open, this was changed in 2008 according
-             to wikipedia and people must dial the full number. For this reason the possible number
-             pattern is restricted to 9 digits. -->
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[23][13-6]\d{7}</nationalNumberPattern>
-        <exampleNumber>211234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[1-8]\d{7}</nationalNumberPattern>
-        <exampleNumber>712345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90[036]\d{6}</nationalNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>801\d{6}</nationalNumberPattern>
-        <exampleNumber>801123456</exampleNumber>
-      </sharedCost>
-      <personalNumber>
-        <nationalNumberPattern>802\d{6}</nationalNumberPattern>
-        <exampleNumber>802123456</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Serbia -->
-    <!-- http://www.itu.int/oth/T02020000B9/en -->
-    <territory id="RS" countryCode="381" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([23]\d{2})(\d{4,7})">
-          <leadingDigits>
-            (?:
-              2[389]|
-              39
-            )0
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([1-4]\d)(\d{4,8})">
-          <leadingDigits>
-            1|
-            2(?:
-              [0-24-7]|
-              [389][1-9]
-            )|
-            3(?:
-              [0-8]|
-              9[1-9]
-            )|
-            42
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(6[0-689])(\d{3,10})">
-          <leadingDigits>6</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([89]\d{2})(\d{3,6})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-46-9]\d{4,11}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,12}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[1-3]\d{6,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,10}</possibleNumberPattern>
-        <exampleNumber>1012345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>6[0-689]\d{3,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,12}</possibleNumberPattern>
-        <exampleNumber>6012345</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{3,6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>80012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          (?:
-            9[0-2]|
-            42
-          )\d{4,7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>90012345</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Russian Federation -->
-    <!-- http://www.itu.int/oth/T02020000AD/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B7 -->
-    <territory id="RU" countryCode="7" internationalPrefix="8~10"
-               nationalPrefix="8" nationalPrefixFormattingRule="$NP ($FG)"
-               mainCountryForCode="true" >
-      <availableFormats>
-        <!-- Formatting from wikipedia, confirmed on Goverment websites such as
-             http://www.minjust.ru/ru/structure/contact/. Contains formatting instructions for
-             Kazakhstan as well. -->
-        <numberFormat pattern="([3489]\d{2})(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>[34689]</leadingDigits>
-          <format>$1 $2-$3-$4</format>
-        </numberFormat>
-        <numberFormat pattern="([67]\d{2})(\d{3})(\d{4})">
-          <leadingDigits>[67]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[3489]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- The Ivanovo area code 493 was omitted on the official document, but this is still used
-             in the yellow pages, and on their own website and is listed on wikipedia. This applies
-             also to 395 (Irkutsk). Also including the 840 prefix for Abkhazia. -->
-        <nationalNumberPattern>
-          (?:
-            3(?:
-              0[12]|
-              4[1-35-79]|
-              5[1-3]|
-              8[1-58]|
-              9[0145]
-            )|
-            4(?:
-              01|
-              1[1356]|
-              2[13467]|
-              7[1-5]|
-              8[1-7]|
-              9[1-689]
-            )|
-            8(?:
-              1[1-8]|
-              2[01]|
-              3[13-6]|
-              4[0-8]|
-              5[15]|
-              6[1-35-7]|
-              7[1-37-9]
-            )
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>3011234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>9\d{9}</nationalNumberPattern>
-        <exampleNumber>9123456789</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- The metadata states that 804 numbers are UAN numbers, but
-             teleum.ru/numbers/toll_free_804 states that they are now being offered as toll-free
-             numbers. -->
-        <nationalNumberPattern>80[04]\d{7}</nationalNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <!-- Covers tele-voting numbers as well. -->
-        <nationalNumberPattern>80[39]\d{7}</nationalNumberPattern>
-        <exampleNumber>8091234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Rwanda -->
-    <!-- http://www.rura.gov.rw/docs/RWANDA_NATIONAL_NUMBERING_PLAN.pdf -->
-    <territory id="RW" countryCode="250" internationalPrefix="000"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="(25\d)(\d{3})(\d{3})">
-          <leadingDigits>2</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([7-9]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>[7-9]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[27-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>25\d{7}</nationalNumberPattern>
-        <exampleNumber>250123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[258]\d{7}</nationalNumberPattern>
-        <exampleNumber>720123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{6}</nationalNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Saudi Arabia -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Saudi_Arabia -->
-    <!-- http://www.itu.int/oth/T02020000B7/en -->
-    <territory id="SA" countryCode="966" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([1-467])(\d{3})(\d{4})">
-          <leadingDigits>[1-467]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(9200)(\d{3})(\d{4})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(5\d)(\d{3})(\d{4})">
-          <leadingDigits>5</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(800)(\d{3})(\d{4})">
-          <leadingDigits>80</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(8111)(\d{3})(\d{3})">
-          <leadingDigits>81</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{7,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1[24-7]|
-            2[24-8]|
-            3[35-8]|
-            4[34-68]|
-            6[2-5]|
-            7[235-7]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>12345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Including "Nomadic" numbers from the Telecom Company "Go" -->
-        <nationalNumberPattern>
-          (?:
-            5[013-69]\d|
-            8111
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>512345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>9200\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>92001234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Solomon Islands -->
-    <territory id="SB" countryCode="677" internationalPrefix="00">
-    </territory>
-
-    <!-- Seychelles -->
-    <!-- http://www.itu.int/oth/T02020000BA/en -->
-    <!-- No evidence can be found that they still use their national prefix, so this is not
-         currently supported. -->
-    <territory id="SC" countryCode="248" internationalPrefix="0[0-2]"
-      preferredInternationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{3})">
-          <leadingDigits>
-            [23578]|
-            [46][0-35-9]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{3})(\d{3})">
-          <leadingDigits>[46]4</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-8]\d{5,6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Includes Fixed Cellular. We are putting Fixed Services numbers here for now, as we
-             cannot find any evidence that they are more expensive to call than other Fixed Line
-             services. ISDN and DID services are here too, since they seem to be also fixed-line
-             phone numbers. -->
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              1[78]|
-              2[14-69]|
-              3[2-4]|
-              4[1-36-8]|
-              6[167]|
-              [89]\d
-            )|
-            3(?:
-              2[1-6]|
-              4[4-6]|
-              55|
-              6[016]|
-              7\d|
-              8[0-589]|
-              9[0-5]
-            )|
-            5(?:
-              5\d|
-              6[0-2]
-            )|
-            6(?:
-              0[0-27-9]|
-              1[0-478]|
-              2[145]|
-              3[02-4]|
-              4[124]|
-              6[015]|
-              7\d|
-              8[1-3]
-            )|
-            78[0138]
-          )\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-        <exampleNumber>217123</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            5(?:
-              [1247-9]\d|
-              6[3-9]
-            )|
-            7(?:
-              [14679]\d|
-              2[1-9]|
-              8[24-79]
-            )
-          )\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-        <exampleNumber>510123</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>8000\d{2}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-        <exampleNumber>800000</exampleNumber>
-      </tollFree>
-      <voip>
-        <nationalNumberPattern>
-          (?:
-            44[1-3]|
-            647
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>4410123</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Sudan -->
-    <!-- http://www.itu.int/oth/T02020000C4/en -->
-    <territory id="SD" countryCode="249" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[19]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Retaining previous prefix as 18 since it seems still to be used. -->
-        <nationalNumberPattern>
-          1(?:
-            [25]\d|
-            8[3567]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>121231234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>9[1259]\d{7}</nationalNumberPattern>
-        <exampleNumber>911231234</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Sweden -->
-    <!-- http://www.pts.se/upload/Ovrigt/Tele/Nummerfragor/Sv_nrplan_telefoni_enl_TU-T_rek_E.164.pdf -->
-    <!-- Formatting patterns are from that document and from the Swedish yellow pages
-         http://gulasidorna.eniro.se -->
-    <territory id="SE" countryCode="46" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(8)(\d{2,3})(\d{2,3})(\d{2})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1-$2 $3 $4</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(8)(\d{2,3})(\d{2,3})(\d{2})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-        <numberFormat pattern="([1-69]\d)(\d{2,3})(\d{2})(\d{2})">
-          <leadingDigits>
-            1[013689]|
-            2[0136]|
-            3[1356]|
-            4[0246]|
-            54|
-            6[03]|
-            90
-          </leadingDigits>
-          <format>$1-$2 $3 $4</format>
-        </numberFormat>
-        <intlNumberFormat pattern="([1-69]\d)(\d{2,3})(\d{2})(\d{2})">
-          <leadingDigits>
-            1[013689]|
-            2[0136]|
-            3[1356]|
-            4[0246]|
-            54|
-            6[03]|
-            90
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-        <numberFormat pattern="([1-69]\d)(\d{3})(\d{2})">
-          <leadingDigits>
-            1[13689]|
-            2[136]|
-            3[1356]|
-            4[0246]|
-            54|
-            6[03]|
-            90
-          </leadingDigits>
-          <format>$1-$2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="([1-69]\d)(\d{3})(\d{2})">
-          <leadingDigits>
-            1[13689]|
-            2[136]|
-            3[1356]|
-            4[0246]|
-            54|
-            6[03]|
-            90
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>
-            1[2457]|
-            2[2457-9]|
-            3[0247-9]|
-            4[1357-9]|
-            5[0-35-9]|
-            6[124-9]|
-            9(?:
-              [125-8]|
-              3[0-5]|
-              4[0-3]
-            )
-          </leadingDigits>
-          <format>$1-$2 $3 $4</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{3})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>
-            1[2457]|
-            2[2457-9]|
-            3[0247-9]|
-            4[1357-9]|
-            5[0-35-9]|
-            6[124-9]|
-            9(?:
-              [125-8]|
-              3[0-5]|
-              4[0-3]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(\d{3})(\d{2,3})(\d{2})">
-          <leadingDigits>
-            1[2457]|
-            2[2457-9]|
-            3[0247-9]|
-            4[1357-9]|
-            5[0-35-9]|
-            6[124-9]|
-            9(?:
-              [125-8]|
-              3[0-5]|
-              4[0-3]
-            )
-          </leadingDigits>
-          <format>$1-$2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{3})(\d{2,3})(\d{2})">
-          <leadingDigits>
-            1[2457]|
-            2[2457-9]|
-            3[0247-9]|
-            4[1357-9]|
-            5[0-35-9]|
-            6[124-9]|
-            9(?:
-              [125-8]|
-              3[0-5]|
-              4[0-3]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(7[02-467])(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>7[02-467]</leadingDigits>
-          <format>$1-$2 $3 $4</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(7[02-467])(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>7[02-467]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(20)(\d{2,3})(\d{2})">
-          <leadingDigits>20</leadingDigits>
-          <format>$1-$2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(20)(\d{2,3})(\d{2})">
-          <leadingDigits>20</leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <numberFormat pattern="(9[034]\d)(\d{2})(\d{2})(\d{3})">
-          <leadingDigits>9[034]</leadingDigits>
-          <format>$1-$2 $3 $4</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(9[034]\d)(\d{2})(\d{2})(\d{3})">
-          <leadingDigits>9[034]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{7,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          1(?:
-            0[1-8]\d{6}|
-            [136]\d{5,7}|
-            (?:
-              2[0-35]|
-              4[0-4]|
-              5[0-25-9]|
-              7[13-6]|
-              [89]\d
-            )\d{5,6}
-          )|
-          2(?:
-            [136]\d{5,7}|
-            (?:
-              2[0-7]|
-              4[0136-8]|
-              5[0-38]|
-              7[018]|
-              8[01]|
-              9[0-57]
-            )\d{5,6}
-          )|
-          3(?:
-            [356]\d{5,7}|
-            (?:
-              0[0-4]|
-              1\d|
-              2[0-25]|
-              4[056]|
-              7[0-2]|
-              8[0-3]|
-              9[023]
-            )\d{5,6}
-          )|
-          4(?:
-            [0246]\d{5,7}|
-            (?:
-              1[01-8]|
-              3[0135]|
-              5[14-79]|
-              7[0-246-9]|
-              8[0156]|
-              9[0-689]
-            )\d{5,6}
-          )|
-          5(?:
-            0[0-6]|
-            1[1-5]|
-            2[0-68]|
-            3[0-4]|
-            4\d|
-            5[0-5]|
-            6[03-5]|
-            7[013]|
-            8[0-79]|
-            9[01]
-          )\d{5,6}|
-          6(?:
-            [03]\d{5,7}|
-            (?:
-              1[1-3]|
-              2[0-4]|
-              4[02-57]|
-              5[0-37]|
-              6[0-3]|
-              7[0-2]|
-              8[0247]|
-              9[0-356]
-            )\d{5,6}
-          )|
-          8\d{6,8}|
-          9(?:
-            0\d{5,7}|
-            (?:
-              1[0-68]|
-              2\d|
-              3[02-59]|
-              4[0-4]|
-              5[0-4]|
-              6[01]|
-              7[0135-8]|
-              8[01]
-            )\d{5,6}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-        <exampleNumber>8123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[02-46]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>701234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>20\d{4,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-        <exampleNumber>201234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          9(?:
-            00|
-            39|
-            44
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9001234567</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>77\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>771234567</exampleNumber>
-      </sharedCost>
-    </territory>
-
-    <!-- Singapore -->
-    <!-- http://www.ida.gov.sg/policies%20and%20regulation/20060508120124.aspx -->
-    <territory id="SG" countryCode="65" internationalPrefix="0[0-3][0-9]">
-      <availableFormats>
-        <numberFormat pattern="([3689]\d{3})(\d{4})">
-          <leadingDigits>
-            [369]|
-            8[1-9]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(1[89]00)(\d{3})(\d{4})">
-          <leadingDigits>1[89]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(7000)(\d{4})(\d{3})">
-          <leadingDigits>70</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(800)(\d{3})(\d{4})">
-          <leadingDigits>80</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <!-- We have a stricter national number pattern for numbers beginning with 6 to enable us to
-             easily strip off leading "65" country codes. -->
-        <nationalNumberPattern>
-          [36]\d{7}|
-          [17-9]\d{7,10}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>6[1-8]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>61234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            8[1-5]|
-            9[0-8]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>81234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>1?800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-        <exampleNumber>18001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>1900\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>19001234567</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>3[0-2]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>31234567</exampleNumber>
-      </voip>
-      <uan>
-        <!-- Although not detailed in the plan beyond mentioning their existence, it seems 7000
-             numbers are used for companies. Most of the online examples are in fact alpha-numbers.
-             -->
-        <nationalNumberPattern>7000\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-        <exampleNumber>70001234567</exampleNumber>
-      </uan>
-      <shortCode>
-        <nationalNumberPattern>
-          1(?:
-            [0136]\d{2}|
-            41\d|
-            [89](?:
-              [1-9]\d|
-              0[1-9]
-            )|
-            [57]\d{2,3})|
-          99\d
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,5}</possibleNumberPattern>
-        <exampleNumber>1312</exampleNumber>
-      </shortCode>
-    </territory>
-
-    <!-- Saint Helena and Tristan da Cunha -->
-    <!-- http://www.itu.int/oth/T02020000AF/en -->
-    <territory id="SH" countryCode="290" internationalPrefix="00">
-      <!-- Numbers are formatted as a block. -->
-      <generalDesc>
-        <nationalNumberPattern>[2-9]\d{3}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            [2-468]\d|
-            7[01]
-          )\d{2}
-        </nationalNumberPattern>
-        <!-- Using St Helena Tourism as the example number. -->
-        <exampleNumber>2158</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>NA</nationalNumberPattern>
-        <possibleNumberPattern>NA</possibleNumberPattern>
-      </mobile>
-      <premiumRate>
-        <nationalNumberPattern>
-          (?:
-            [59]\d|
-            7[2-9]
-          )\d{2}
-        </nationalNumberPattern>
-        <exampleNumber>5012</exampleNumber>
-      </premiumRate>
-      <shortCode>
-        <nationalNumberPattern>1\d{2,3}</nationalNumberPattern>
-        <possibleNumberPattern>\d{3,4}</possibleNumberPattern>
-      </shortCode>
-    </territory>
-
-    <!-- Slovenia -->
-    <!-- http://www.itu.int/oth/T02020000BE/en -->
-    <territory id="SI" countryCode="386" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="($NP$FG)"
-          pattern="(\d)(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>
-            [12]|
-            3[4-8]|
-            4[24-8]|
-            5[3-8]|
-            7[3-8]
-          </leadingDigits>
-          <format>$1 $2 $3 $4</format>
-          </numberFormat>
-        <numberFormat pattern="([3-7]\d)(\d{3})(\d{3})">
-          <leadingDigits>
-            [37][01]|
-            4[019]|
-            51|
-            64
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-          </numberFormat>
-        <numberFormat pattern="([89][09])(\d{3,6})">
-          <leadingDigits>[89][09]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([58]\d{2})(\d{5})">
-          <leadingDigits>
-            59|
-            8[1-3]
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [1-7]\d{6,7}|
-          [89]\d{4,7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1\d|
-            2[2-8]|
-            3[4-8]|
-            4[24-8]|
-            [57][3-8]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-        <exampleNumber>11234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- We include 049 here - it is VoIP in the plan, but SMS messages have been successfully
-             delivered - and it is run by Mobitel. There are also mobile numbers found on the
-             internet with this prefix - it is apparently used in Kosovo. -->
-        <nationalNumberPattern>
-          (?:
-            [37][01]|
-            4[019]|
-            51|
-            64
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>31234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{4,6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-        <exampleNumber>80123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <!-- Includes televoting, mass calling -->
-        <nationalNumberPattern>
-          90\d{4,6}|
-          89[1-3]\d{2,5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,8}</possibleNumberPattern>
-        <exampleNumber>90123456</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>
-          (?:
-            59|
-            8[1-3]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>59012345</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Slovakia -->
-    <!-- http://www.itu.int/oth/T02020000BD/en -->
-    <territory id="SK" countryCode="421" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(2)(\d{3})(\d{3})(\d{2})">
-          <leadingDigits>2</leadingDigits>
-          <format>$1/$2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="([3-5]\d)(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>[3-5]</leadingDigits>
-          <format>$1/$2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="([689]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>[689]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-689]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[2-5]\d{8}</nationalNumberPattern>
-        <exampleNumber>212345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- 948 isn't in the number pattern, but many examples using this have been found, so
-             deeming it valid for now. -->
-        <nationalNumberPattern>
-          9(?:
-            0[1-8]|
-            1[0-24-9]|
-            4[0489]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>912123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>
-          9(?:
-            [78]\d{7}|
-            00\d{6}
-          )
-        </nationalNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>8[5-9]\d{7}</nationalNumberPattern>
-        <exampleNumber>850123456</exampleNumber>
-      </sharedCost>
-      <voip>
-        <nationalNumberPattern>
-          6(?:
-            5[0-4]|
-            9[0-6]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>690123456</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Sierra Leone -->
-    <!-- http://www.itu.int/oth/T02020000BB/en -->
-    <territory id="SL" countryCode="232" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)">
-      <availableFormats>
-        <!-- Following formatting of online yellow pages www.leonedirect.com -->
-             <numberFormat pattern="(\d{2})(\d{6})">
-               <format>$1 $2</format>
-             </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-578]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[235]2[2-4][2-9]\d{4}</nationalNumberPattern>
-        <exampleNumber>22221234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding prefix 50 because it was found in online numbers and this is supported by
-             http://www.wtng.info/wtng-232-sl.html - although the data may be outdated, since no
-             further information about Datatel can be found. -->
-        <nationalNumberPattern>
-          (?:
-            25|
-            3[03]|
-            44|
-            5[056]|
-            7[6-8]|
-            88
-          )[1-9]\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>25123456</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- San Marino -->
-    <!-- http://www.itu.int/oth/T02020000B5/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B39 (Information about Italy) -->
-    <!-- http://en.wikipedia.org/wiki/%2B378-->
-    <!-- San Marino fixed-line numbers have an area code of "0549". However, this seems to be
-         optional when dialling from outside the country; the phone number can be reached both with
-         and without this area code. The nationalPrefixForParsing and nationalPrefixTransformRule
-         are used to ensure that if the 0549 is not present, it will be added. -->
-    <territory id="SM" countryCode="378" internationalPrefix="00"
-      nationalPrefixForParsing="(?:0549)?([89]\d{5})" nationalPrefixTransformRule="0549$1">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[5-7]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <leadingDigits>[5-7]</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-        <!-- We follow the guidelines of the yellow-pages when formatting in national format. -->
-        <numberFormat pattern="(0549)(\d{6})">
-          <leadingDigits>0</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- We follow the guidelines of the Telecommunications Document published on ITU when
-             formatting in international format. -->
-        <intlNumberFormat pattern="(0549)(\d{6})">
-          <leadingDigits>0</leadingDigits>
-          <format>($1) $2</format>
-        </intlNumberFormat>
-        <!-- A rule in case the number has been stored without the leading 0549 necessary for
-             fixed-lines. -->
-        <numberFormat pattern="(\d{6})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>0549 $1</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{6})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>(0549) $1</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[05-7]\d{7,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <!-- Example numbers provided by the Telecommunications Services. -->
-      <fixedLine>
-        <nationalNumberPattern>
-          0549(?:
-            8[0157-9]|
-            9\d
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>0549886377</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>6[16]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>66661212</exampleNumber>
-      </mobile>
-      <premiumRate>
-        <!-- Includes Video Call numbers. -->
-        <nationalNumberPattern>7[178]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>71123456</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>5[158]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>58001110</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Senegal -->
-    <!-- http://www.itu.int/oth/T02020000B8/en -->
-    <territory id="SN" countryCode="221" internationalPrefix="00">
-      <availableFormats>
-        <!-- Using yellow pages and online telecom company formatting, rather than that implied in
-             the national numbering plan. -->
-        <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[37]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          3(?:
-            010|
-            3(?:
-              8[1-9]|
-              9[2-9]
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>301012345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding 77 7[45]X and 77 9[0-6]X from online searches and from numbers successfully
-             delivered by the wireless team. -->
-        <nationalNumberPattern>
-          7(?:
-            0[1256]0|
-            6(?:
-              1[23]|
-              2[89]|
-              3[3489]|
-              4[6-9]|
-              5[1-389]|
-              6[6-9]|
-              7[45]|
-              8[3-8]
-            )|
-            7(?:
-              1[014-8]|
-              2[0-7]|
-              3[0-35-8]|
-              4[0-6]|
-              [56]\d|
-              7[0-589]|
-              8[01]|
-              9[0-6]
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>701012345</exampleNumber>
-      </mobile>
-      <voip>
-        <nationalNumberPattern>33301\d{4}</nationalNumberPattern>
-        <exampleNumber>333011234</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Somalia -->
-    <!-- http://www.itu.int/oth/T02020000C0/en -->
-    <!-- This document seems to cover only a small set of prefixes in Somalia.
-    Somalia has limited information available, and the numerous telecom carriers
-    were previously working under an unregulated environment. The extra prefixes
-    were added from the contact phone numbers of the countries main telecom
-    operators. See regression tests for more details. -->
-    <territory id="SO" countryCode="252" internationalPrefix="00">
-      <availableFormats>
-        <!-- These follow formats online, such as www.hortel.net/contact_us.html -->
-        <numberFormat pattern="([13-5])(\d{6})">
-          <leadingDigits>[13-5]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- Unfortunately numbers beginning with 1 are hard to format based on prefixes, since it
-             depends on number length. -->
-        <numberFormat pattern="([19]\d)(\d{6})">
-          <leadingDigits>15|9</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[13-59]\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            5[57-9]|
-            [134]\d
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <!-- Example numbers are test numbers from the document. -->
-        <exampleNumber>5522010</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            9[01]|
-            15
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>90792024</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Suriname -->
-    <territory id="SR" countryCode="597" internationalPrefix="00">
-    </territory>
-
-    <!-- Sao Tome and Principe -->
-    <!-- http://www.itu.int/oth/T02020000B6/en -->
-    <territory id="ST" countryCode="239" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[29]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>22\d{5}</nationalNumberPattern>
-        <exampleNumber>2221234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>9[89]\d{5}</nationalNumberPattern>
-        <exampleNumber>9812345</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- El Salvador -->
-    <territory id="SV" countryCode="503" internationalPrefix="00">
-    </territory>
-
-    <!-- Syrian Arab Republic -->
-    <!-- http://www.itu.int/oth/T02020000C9/en -->
-    <territory id="SY" countryCode="963" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{3,4})">
-          <leadingDigits>[1-5]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(9[3-689])(\d{4})(\d{3})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-59]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1(?:
-              1\d?|
-              4\d|
-              [2356]
-            )|
-            2[1-35]|
-            3(?:
-              1\d|
-              [34]
-            )|
-            4[13]|
-            5[1-3]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>112345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- 945, 967 and 991 numbers are added as SMS messages have been successfully delivered to
-             these numbers, and they are also widely present on the Internet. -->
-        <nationalNumberPattern>
-          9(?:
-            3[23]|
-            4[457]|
-            55|
-            6[67]|
-            88|
-            9[19]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>944567890</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-    </territory>
-
-    <!-- Swaziland -->
-    <!-- http://www.itu.int/oth/T02020000C6/en -->
-    <!-- Note this plan is scheduled to change in February 2011 so should be updated at that time.
-         -->
-    <territory id="SZ" countryCode="268" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <leadingDigits>[2-6]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{4})(\d{4})">
-          <leadingDigits>[027]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[02-7]\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </generalDesc>
-      <noInternationalDialling>
-        <nationalNumberPattern>0800\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>08001234</exampleNumber>
-      </noInternationalDialling>
-      <fixedLine>
-        <!-- The leading optional 2 is because future changes to the fixed-line plan will be made by
-             prepending a two to fixed-line numbers. -->
-        <nationalNumberPattern>
-          2?(?:
-            2(?:
-              0[07]|
-              [13]7|
-              2[57]
-            )|
-            3(?:
-              0[34]|
-              [1278]3|
-              3[23]|
-              [46][34]
-            )|
-            (?:
-              40[4-69]|
-              16|
-              2[12]|
-              3[57]|
-              [4578]2|
-              67
-            )|
-            5(?:
-              0[5-7]|
-              1[6-9]|
-              [23][78]|
-              48|
-              5[01]
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>2171234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            6|
-            7[6-8]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>76123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>0800\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>08001234</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Turks and Caicos Islands -->
-    <!-- http://www.itu.int/oth/T02020000D8/en -->
-    <territory id="TC" countryCode="1" leadingDigits="649"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[689]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          649(?:
-            712|
-            9(?:
-              4\d|
-              50
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>6497121234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          649(?:
-            2(?:
-              3[12]|
-              4[1-5]
-            )|
-            3(?:
-              3[1-39]|
-              4[1-57]
-            )|
-            4[34][12]
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>6492311234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002345678</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-      <voip>
-        <nationalNumberPattern>64971[01]\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>6497101234</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Chad -->
-    <!-- http://www.itu.int/oth/T0202000029/en -->
-    <!-- The international prefix includes 16 as the international manual exchange. -->
-    <territory id="TD" countryCode="235" preferredInternationalPrefix="00"
-         internationalPrefix="00|16">
-      <availableFormats>
-        <numberFormat
-          pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2679]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          22(?:
-            [3789]0|
-            5[0-5]|
-            6[89]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>22501234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Sotel Tchad "SALAM" (77 XX XX XX) is classified as a fixed operator in the plan, but it
-             also says numbers starting with 7 are mobile numbers. Putting under mobile for now.
-             Also adding 63[5-7] from evidence of successful SMS delivery. -->
-        <nationalNumberPattern>
-          (?:
-            6(?:
-              3[0-7]|
-              6\d
-            )|
-            77\d|
-            9(?:
-              5[0-4]|
-              9\d
-            )
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>63012345</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- French Southern Territories -->
-    <territory id="TF" countryCode="262" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Togo -->
-    <!-- http://www.itu.int/oth/T02020000D1/en -->
-    <territory id="TG" countryCode="228" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{2})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[02-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2[2-7]|
-            3[23]|
-            44|
-            55|
-            66|
-            77
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>2212345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Added prefix 09 because many mobile numbers were found with this. -->
-        <nationalNumberPattern>
-          (?:
-            0[1-9]|
-            7[56]|
-            8[1-7]|
-            9\d
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>0112345</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Thailand -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000CD0001MSWE.doc -->
-    <territory id="TH" countryCode="66" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- Formatting patterns from wikipedia and the document itself -
-        http://en.wikipedia.org/wiki/%2B66 -->
-        <numberFormat pattern="(2)(\d{3})(\d{4})">
-          <leadingDigits>2</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([3-7]\d)(\d{3})(\d{3,4})">
-          <leadingDigits>[3-7]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(8)(\d{4})(\d{4})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="(1[89]00)(\d{3})(\d{3})">
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [2-8]\d{7,8}|
-          1\d{9}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2[1-9]|
-            3[24-9]|
-            4[2-5]|
-            5[3-6]|
-            7[3-7]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-        <exampleNumber>21234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- 8[02] numbers are added as SMS messages have been successfully delivered to these
-             numbers, and they are also widely present on the Internet. -->
-        <nationalNumberPattern>8\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>812345678</exampleNumber>
-      </mobile>
-      <!-- http://en.wikipedia.org/wiki/Toll-free_telephone_number -->
-      <tollFree>
-        <nationalNumberPattern>1800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>1900\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>1900123456</exampleNumber>
-      </premiumRate>
-      <voip>
-        <nationalNumberPattern>60\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>601234567</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Tajikistan -->
-    <!-- http://www.itu.int/oth/T02020000CA/en -->
-    <territory id="TJ" countryCode="992" internationalPrefix="8~10"
-               nationalPrefix="8" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([349]\d{2})(\d{2})(\d{4})">
-          <leadingDigits>
-            [34]7|
-            91[78]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([49]\d)(\d{3})(\d{4})">
-          <leadingDigits>
-            4[48]|
-            9(?:
-              19|
-              [0235-9]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(331700)(\d)(\d{2})">
-          <leadingDigits>331</leadingDigits>
-          <leadingDigits>3317</leadingDigits>
-          <leadingDigits>33170</leadingDigits>
-          <leadingDigits>331700</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{4})(\d)(\d{4})">
-          <leadingDigits>3[1-5]</leadingDigits>
-          <leadingDigits>
-            3(?:
-              [1245]|
-              3(?:
-                [02-9]|
-                1[0-589]
-              )
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[349]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{3,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            3(?:
-              1[3-5]|
-              2[245]|
-              31|
-              4[24-7]|
-              5[25]|
-              72
-            )|
-            4(?:
-              46|
-              74|
-              87
-            )
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>372123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding 90 prefix as SMS messages could be successfully delivered to these mobile
-             numbers. -->
-        <nationalNumberPattern>9[0-35-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>917123456</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-    </territory>
-
-    <!-- Tokelau -->
-    <territory id="TK" countryCode="690" internationalPrefix="00">
-    </territory>
-
-    <!-- Timor-Leste (East Timor) -->
-    <!-- http://www.itu.int/oth/T02020000D0/en -->
-    <territory id="TL" countryCode="670" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-47-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2[1-5]|
-            3[1-9]|
-            4[1-4]
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>2112345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[2-4]\d{5}</nationalNumberPattern>
-        <exampleNumber>7212345</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{5}</nationalNumberPattern>
-        <exampleNumber>8012345</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90\d{5}</nationalNumberPattern>
-        <exampleNumber>9012345</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <nationalNumberPattern>70\d{5}</nationalNumberPattern>
-        <exampleNumber>7012345</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Turkmenistan -->
-    <!-- http://www.itu.int/oth/T02020000D7/en -->
-    <territory id="TM" countryCode="993" internationalPrefix="8~10"
-               nationalPrefix="8" nationalPrefixFormattingRule="$NP $FG">
-      <availableFormats>
-        <!-- There doesn't seem to be a standardized format. The format below is based on the
-             Turkmenistan embassy at
-             http://www.turkmenistanembassy.org/turkmen/info/contact.html -->
-          <numberFormat pattern="([1-6]\d)(\d{2})(\d{2})(\d{2})">
-            <format>$1 $2 $3 $4</format>
-          </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-6]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            12\d|
-            243|
-            [3-5]22
-          )\d{5}
-        </nationalNumberPattern>
-        <exampleNumber>12345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding 68 as SMS messages have been successfully sent to numbers with this prefix. -->
-        <nationalNumberPattern>6[6-8]\d{6}</nationalNumberPattern>
-        <exampleNumber>66123456</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-    </territory>
-
-    <!-- Tunisia -->
-    <!-- http://www.itu.int/oth/T02020000D5/en -->
-    <territory id="TN" countryCode="216" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="([247-9]\d)(\d{3})(\d{3})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[247-9]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>7\d{7}</nationalNumberPattern>
-        <exampleNumber>71234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            2[0-7]|
-            40|
-            9\d
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>20123456</exampleNumber>
-      </mobile>
-      <!-- These are listed as 'value added services' - pending further information, we add them
-           here for now. -->
-      <premiumRate>
-        <nationalNumberPattern>8[028]\d{6}</nationalNumberPattern>
-        <exampleNumber>80123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Tonga -->
-    <territory id="TO" countryCode="676" internationalPrefix="00">
-    </territory>
-
-    <!-- Turkey -->
-    <!-- http://en.wikipedia.org/wiki/%2B90 -->
-    <!-- http://www.itu.int/oth/T02020000D6/en -->
-    <territory id="TR" countryCode="90" internationalPrefix="00" nationalPrefix="0">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="($NP$FG)" pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>
-            [23]|
-            4(?:
-              [0-35-9]|
-              4[0-35-9]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$NP$FG" pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>[589]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(444)(\d{1})(\d{3})">
-          <leadingDigits>444</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [2-589]\d{9}|
-          444\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Includes numbers starting with 392 for Northern Cyprus. -->
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              [13][26]|
-              [28][2468]|
-              [45][268]|
-              [67][246]
-            )|
-            3(?:
-              [13][28]|
-              [24-6][2468]|
-              [78][02468]|
-              92
-            )|
-            4(?:
-              [16][246]|
-              [23578][2468]|
-              4[26]
-            )
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>2123456789</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          5(?:
-            0[1-35-7]|
-            22|
-            3\d|
-            4[1-79]|
-            5[1-5]|
-            9[246]
-          )\d{7}
-          </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5012345678</exampleNumber>
-      </mobile>
-      <paging>
-        <nationalNumberPattern>512\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5123456789</exampleNumber>
-      </paging>
-      <tollFree>
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9001234567</exampleNumber>
-      </premiumRate>
-      <uan>
-        <!-- http://www.turktelekom.com.tr/tt/portal/News/Archive/7-digit-special-service-number-starting-with-444 -->
-        <nationalNumberPattern>
-          444\d{4}|
-          850\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-        <exampleNumber>4441444</exampleNumber>
-      </uan>
-    </territory>
-
-    <!-- Trinidad and Tobago -->
-    <!-- http://www.itu.int/oth/T02020000D4/en -->
-    <territory id="TT" countryCode="1" leadingDigits="868"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>[89]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          868(?:
-            2(?:
-              01|
-              2[1-4]
-            )|
-            6(?:
-              1[4-6]|
-              2[1-9]|
-              [3-6]\d|
-              7[0-79]|
-              9[0-8]
-            )|
-            82[12]
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>8682211234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          868(?:
-            29\d|
-            3(?:
-              0[1-9]|
-              1[02-9]|
-              [2-9]\d
-            )|
-            4(?:
-              [679]\d|
-              8[0-4]
-            )|
-            6(?:
-              20|
-              78|
-              8\d
-            )|
-            7(?:
-              1[02-9]|
-              [2-9]\d
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8682911234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002345678</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Tuvalu -->
-    <territory id="TV" countryCode="688" internationalPrefix="00">
-    </territory>
-
-    <!-- Taiwan, China -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000EB0003MSWE.doc -->
-    <!-- Extension symbols found on the internet so far have been #, X and Ext -
-         so # has been chosen as the preferred extension prefix. -->
-    <territory id="TW" countryCode="886" internationalPrefix="0(?:0[25679]|19)"
-               nationalPrefix="0" preferredExtnPrefix="#" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([2-8])(\d{3,4})(\d{4})">
-          <leadingDigits>
-            [2-7]|
-            8[1-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([89]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>
-            80|
-            9
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-9]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[2-8]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-        <exampleNumber>21234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>9\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>912345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Tanzania -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000CB0001MSWE.doc -->
-    <territory id="TZ" countryCode="255" internationalPrefix="00[056]"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([24]\d)(\d{3})(\d{4})">
-          <leadingDigits>[24]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([67]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>[67]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Formatting for special numbers from www.tcra.go.tz -->
-        <numberFormat pattern="([89]\d{2})(\d{2})(\d{4})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>2[2-8]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-        <exampleNumber>222345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            6[158]|
-            7[1-9]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>612345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80[08]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>
-          8(?:
-            40|
-            6[01]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>840123456</exampleNumber>
-      </sharedCost>
-      <voip>
-        <nationalNumberPattern>41\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>412345678</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Ukraine -->
-    <!-- http://www.itu.int/oth/T02020000DB/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B380 -->
-    <territory id="UA" countryCode="380" internationalPrefix="0~0"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- City codes separated out. No definitive list has been found of what constitutes the
-             area code - http://www.ua.all-biz.info/guide/phonecodes is useful but not error-free.
-             Have used local yellow pages guidelines, Google searches and regression tests to
-             reverse-engineer these rules as well as bugs. -->
-        <numberFormat pattern="([3-69]\d)(\d{3})(\d{4})">
-          <leadingDigits>
-            39|
-            4(?:
-              [45][0-5]|
-              87
-            )|
-            5(?:
-              0|
-              6[37]|
-              7[37]
-            )|
-            6[36-8]|
-            9[1-9]
-          </leadingDigits>
-          <leadingDigits>
-            39|
-            4(?:
-              [45][0-5]|
-              87
-            )|
-            5(?:
-              0|
-              6(?:
-                3[14-7]|
-                7
-              )|
-              7[37]
-            )|
-            6[36-8]|
-            9[1-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([3-689]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>
-            3[1-8]2|
-            4[1378]2|
-            5(?:
-              [12457]2|
-              6[24]
-            )|
-            6(?:
-              [49]2|
-              [12][29]|
-              5[24]
-            )|
-            8|
-            90
-          </leadingDigits>
-          <leadingDigits>
-            3(?:
-              [1-46-8]2[013-9]|
-              52
-            )|
-            4[1378]2|
-            5(?:
-              [12457]2|
-              6[24]
-            )|
-            6(?:
-              [49]2|
-              [12][29]|
-              5[24]
-            )|
-            8|
-            90
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([3-6]\d{3})(\d{5})">
-          <leadingDigits>
-            3(?:
-              5[013-9]|
-              [1-46-8]
-            )|
-            4(?:
-              [137][013-9]|
-              6|
-              [45][6-9]|
-              8[4-6]
-            )|
-            5(?:
-              [1245][013-9]|
-              6[0135-9]|
-              3|
-              7[4-6]
-            )|
-            6(?:
-              [49][013-9]|
-              5[0135-9]|
-              [12][13-8]
-            )
-          </leadingDigits>
-          <leadingDigits>
-            3(?:
-              5[013-9]|
-              [1-46-8](?:
-                22|
-                [013-9]
-              )
-            )|
-            4(?:
-              [137][013-9]|
-              6|
-              [45][6-9]|
-              8[4-6]
-            )|
-            5(?:
-              [1245][013-9]|
-              6(?:
-                3[02389]|
-                [015689]
-              )|
-              3|
-              7[4-6]
-            )|
-            6(?:
-              [49][013-9]|
-              5[0135-9]|
-              [12][13-8]
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[3-689]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            3[1-8]|
-            4[13-8]|
-            5[1-7]|
-            6[12459]
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>311234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            39|
-            50|
-            6[36-8]|
-            9[1-9]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>391234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>900123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Uganda -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000F10001MSWE.doc -->
-    <!-- http://www.ucc.co.ug/licensing/ugandaNumberingPlan.pdf -->
-    <territory id="UG" countryCode="256" internationalPrefix="00[057]"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([247-9]\d{2})(\d{6})">
-          <leadingDigits>
-            [7-9]|
-            200|
-            4(?:
-              6[45]|
-              [7-9]
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([34]\d)(\d{7})">
-          <leadingDigits>
-            3|
-            4(?:
-              [1-5]|
-              6[0-36-9]
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(2024)(\d{5})">
-          <leadingDigits>202</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          3\d{8}|
-          4(?:
-            [1-6]\d|
-            7[136]|
-            8[1356]|
-            96
-          )\d{6}|
-          20(?:
-            0\d|
-            24
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,9}</possibleNumberPattern>
-        <exampleNumber>312345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          7(?:
-            [1578]\d|
-            0[0-4]
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>712345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800[123]\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>90[123]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>901123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- United States -->
-    <!-- http://www.nanpa.com/reports/reports_npa.html -->
-    <!-- http://en.wikipedia.org/wiki/North_American_Numbering_Plan -->
-    <!-- Note the national prefix of US is the same as its country code, and when formatting phone
-         numbers in the national format, it is not included. Therefore, we omit it here to make
-         formatting consistent with the rest of the world. The same applies to all the
-         countries/regions under NANPA -->
-    <!-- The national prefix of "1" here is the same as the country code. It is not used by default
-         when formatting, but is set here so that users who are calling formatByPattern can specify
-         NationalPrefixFormattingRule if they want to. -->
-    <territory id="US" countryCode="1" internationalPrefix="011"
-      mainCountryForCode="true" nationalPrefix="1">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <format>($1) $2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <format>$1-$2</format>
-        </numberFormat>
-        <!-- A different pattern is used when formatting internationally, as the area code is no
-             longer optional and should not be in brackets. -->
-        <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <format>$1-$2-$3</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-9]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              0[1-35-9]|
-              1[02-9]|
-              2[4589]|
-              3[149]|
-              4[08]|
-              5[1-46]|
-              6[0279]|
-              7[06]|
-              8[13]
-            )|
-            3(?:
-              0[1-57-9]|
-              1[02-9]|
-              2[0135]|
-              3[014679]|
-              47|
-              5[12]|
-              6[01]|
-              8[056]
-            )|
-            4(?:
-              0[124-9]|
-              1[02-579]|
-              2[3-5]|
-              3[0245]|
-              4[0235]|
-              58|
-              69|
-              7[0589]|
-              8[04]
-            )|
-            5(?:
-              0[1-57-9]|
-              1[0235-8]|
-              20|
-              3[04]|
-              4[01]|
-              5[19]|
-              6[1-37]|
-              7[013-5]|
-              8[056]
-            )|
-            6(?:
-              0[1-35-9]|
-              1[024-9]|
-              2[036]|
-              3[016]|
-              4[16]|
-              5[017]|
-              6[0-29]|
-              78|
-              8[12]
-            )|
-            7(?:
-              0[1-46-8]|
-              1[2-9]|
-              2[047]|
-              3[124]|
-              4[07]|
-              5[47]|
-              6[02359]|
-              7[02-59]|
-              8[156]
-            )|
-            8(?:
-              0[1-68]|
-              1[02-8]|
-              28|
-              3[0-25]|
-              4[3578]|
-              5[06-9]|
-              6[02-5]|
-              7[028]
-            )|
-            9(?:
-              0[1346-9]|
-              1[02-9]|
-              2[058]|
-              3[1678]|
-              4[0179]|
-              5[1246]|
-              7[0-3589]|
-              8[059]
-            )
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>2012345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              0[1-35-9]|
-              1[02-9]|
-              2[4589]|
-              3[149]|
-              4[08]|
-              5[1-46]|
-              6[0279]|
-              7[06]|
-              8[13]
-            )|
-            3(?:
-              0[1-57-9]|
-              1[02-9]|
-              2[0135]|
-              3[014679]|
-              47|
-              5[12]|
-              6[01]|
-              8[056]
-            )|
-            4(?:
-              0[124-9]|
-              1[02-579]|
-              2[3-5]|
-              3[0245]|
-              4[0235]|
-              58|
-              69|
-              7[0589]|
-              8[04]
-            )|
-            5(?:
-              0[1-57-9]|
-              1[0235-8]|
-              20|
-              3[04]|
-              4[01]|
-              5[19]|
-              6[1-37]|
-              7[013-5]|
-              8[056]
-            )|
-            6(?:
-              0[1-35-9]|
-              1[024-9]|
-              2[036]|
-              3[016]|
-              4[16]|
-              5[017]|
-              6[0-29]|
-              78|
-              8[12]
-            )|
-            7(?:
-              0[1-46-8]|
-              1[2-9]|
-              2[047]|
-              3[124]|
-              4[07]|
-              5[47]|
-              6[02359]|
-              7[02-59]|
-              8[156]
-            )|
-            8(?:
-              0[1-68]|
-              1[02-8]|
-              28|
-              3[0-25]|
-              4[3578]|
-              5[06-9]|
-              6[02-5]|
-              7[028]
-            )|
-            9(?:
-              0[1346-9]|
-              1[02-9]|
-              2[058]|
-              3[1678]|
-              4[0179]|
-              5[1246]|
-              7[0-3589]|
-              8[059]
-            )
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>2012345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002345678</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Uruguay -->
-    <territory id="UY" countryCode="598" internationalPrefix="00"
-               nationalPrefix="0">
-    </territory>
-
-    <!-- Uzbekistan -->
-    <!-- http://www.itu.int/oth/T02020000E1/en -->
-    <territory id="UZ" countryCode="998" internationalPrefix="8~10"
-               nationalPrefix="8" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([679]\d)(\d{3})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[679]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Adding 70 prefix as suggested by http://www.ttts.uz/eng/telephone_codes/codes_uzb_eng
-             -->
-        <nationalNumberPattern>
-          (?:
-            6[125679]|
-            7[0-69]
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>612345678</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding 9[45] as suggested by http://www.ucell.uz/en/for_subscribers/how_to_call.html
-             -->
-        <nationalNumberPattern>9[0-57-9]\d{7}</nationalNumberPattern>
-        <exampleNumber>912345678</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-    </territory>
-
-    <!-- Vatican City -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Vatican_City -->
-    <!-- Note that numbers here are also accessible via Italy (+39 and prefix of 06 698) but can
-         also be dialled with the Vatican City country code. -->
-    <territory id="VA" countryCode="379" internationalPrefix="00" >
-      <availableFormats>
-        <numberFormat pattern="(06)(\d{4})(\d{4})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>06\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>06698\d{5}</nationalNumberPattern>
-        <exampleNumber>0669812345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- We have no information on mobile numbers from the Vatican. It is probable that they use
-             Italian mobile contracts. -->
-        <nationalNumberPattern>N/A</nationalNumberPattern>
-        <possibleNumberPattern>N/A</possibleNumberPattern>
-      </mobile>
-      <!-- No information exists about other types of numbers. -->
-    </territory>
-
-    <!-- Saint Vincent and the Grenadines -->
-    <!-- http://www.itu.int/oth/T02020000B3/en -->
-    <territory id="VC" countryCode="1" leadingDigits="784"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>
-          (?:
-            784|
-            8(?:
-              00|
-              66|
-              77|
-              88
-            )|
-            900
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          784(?:
-            266|
-            3(?:
-              6[6-9]|
-              7\d|
-              8[0-24-6]
-            )|
-            4(?:
-              38|
-              5[0-36-8]|
-              8\d|
-              9[01]
-            )|
-            555|
-            638|
-            784
-          )\d{4}
-        </nationalNumberPattern>
-        <exampleNumber>7842661234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          784(?:
-            4(?:
-              3[0-24]|
-              5[45]|
-              9[2-5]
-            )|
-            5(?:
-              2[6-9]|
-              3[0-3]|
-              93
-            )
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7844301234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002345678</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Venezuela -->
-    <!-- http://www.itu.int/oth/T02020000E3/en -->
-    <!-- http://en.wikipedia.org/wiki/+58 -->
-    <!-- 1XX specifies a particular carrier to route a call to. -->
-    <territory id="VE" countryCode="58" internationalPrefix="00"
-      nationalPrefix="0" nationalPrefixForParsing="(1\d{2})|0"
-      nationalPrefixFormattingRule="$NP$FG"
-      carrierCodeFormattingRule="$CC $FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{7})">
-          <format>$1-$2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[24589]\d{9}</nationalNumberPattern>
-        <!-- Open numbering plan. -->
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Including region-free 500 calls here, since these are treated as local calls. Wikipedia
-             mentions these as 5XX, but online examples that can be found are seemingly restricted
-             to 50[01]. -->
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              12|
-              3[457-9]|
-              [58][1-9]|
-              [467]\d|
-              9[1-6]
-            )|
-            50[01]
-          )\d{7}
-        </nationalNumberPattern>
-        <exampleNumber>2121234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          4(?:
-            1[24-8]|
-            2[46]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>4121234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8001234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9001234567</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Virgin Islands, British -->
-    <!-- http://www.itu.int/oth/T020200001E/en -->
-    <territory id="VG" countryCode="1" leadingDigits="284"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>
-          (?:
-            284|
-            8(?:
-              00|
-              66|
-              77|
-              88
-            )|
-            900
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          284(?:
-            (?:
-              229|
-              4(?:
-                46|
-                9[45]
-              )|
-              8(?:
-                52|
-                6[459]
-              )
-            )\d{4}|
-            496[0-5]\d{3}
-          )
-        </nationalNumberPattern>
-        <exampleNumber>2842291234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          284(?:
-            (?:
-              30[0-3]|
-              4(?:
-                4[0-5]|
-                68|
-                99
-              )|
-              54[0-4]
-            )\d{4}|
-            496[6-9]\d{3}
-          )
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>2843001234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002345678</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Virgin Islands, United States -->
-    <!-- http://www.itu.int/oth/T02020000DF/en -->
-    <territory id="VI" countryCode="1" leadingDigits="340"
-      nationalPrefix="1" internationalPrefix="011">
-      <generalDesc>
-        <!-- NANPA country - uses US formatting rules -->
-        <nationalNumberPattern>
-          340(?:
-            6[49]2|
-            7[17]\d
-          )\d{4}|
-          (?:
-            8(?:
-              00|
-              66|
-              77|
-              88
-            )|
-            900
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <exampleNumber>3406421234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <exampleNumber>3406421234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>
-          8(?:
-            00|
-            55|
-            66|
-            77|
-            88
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8002345678</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>9002345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <!-- http://www.nanpa.com/pdf/PL_416.pdf -->
-        <nationalNumberPattern>
-          5(?:
-            00|
-            33|
-            44
-          )[2-9]\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5002345678</exampleNumber>
-      </personalNumber>
-    </territory>
-
-    <!-- Viet Nam (Vietnam) -->
-    <!-- http://www.itu.int/oth/T02020000E4/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B84 -->
-    <territory id="VN" countryCode="84" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([48])(\d{4})(\d{4})">
-          <leadingDigits>[48]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([235-7]\d)(\d{4})(\d{3})">
-          <leadingDigits>
-            2[025-79]|
-            3[0136-9]|
-            5[2-9]|
-            6[0-46-9]|
-            7[02-79]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(80)(\d{5})">
-          <leadingDigits>80</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(69\d)(\d{4,5})">
-          <leadingDigits>69</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([235-7]\d{2})(\d{4})(\d{3})">
-          <leadingDigits>
-            2[1348]|
-            3[25]|
-            5[01]|
-            65|
-            7[18]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(9\d)(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>9</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(1[2689]\d)(\d{3})(\d{4})">
-          <leadingDigits>
-            1(?:
-              [26]|
-              88|
-              99
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="(1[89]00)(\d{4,6})">
-          <leadingDigits>1[89]0</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          8\d{5,8}|
-          [1-79]\d{7,9}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            2(?:
-              [025-79]|
-              1[0189]|
-              [348][01]
-            )|
-            3(?:
-              [0136-9]|
-              [25][01]
-            )|
-            [48]\d|
-            5(?:
-              [01][01]|
-              [2-9]
-            )|
-            6(?:
-              [0-46-8]|
-              5[01]
-            )|
-            7(?:
-              [02-79]|
-              [18][01]
-            )
-          )\d{7}|
-          69\d{5,6}|
-          80\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-        <exampleNumber>2101234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            9\d|
-            1(?:
-              2\d|
-              6[3-9]|
-              88|
-              99
-            )
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>912345678</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>1800\d{4,6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-        <exampleNumber>1800123456</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>1900\d{4,6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-        <exampleNumber>1900123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Vanuatu -->
-    <territory id="VU" countryCode="678" internationalPrefix="00">
-    </territory>
-
-    <!--  Wallis and Futuna (Territoire français d'outre-mer) -->
-    <territory id="WF" countryCode="681" internationalPrefix="19">
-    </territory>
-
-    <!-- Samoa -->
-    <!-- http://www.itu.int/oth/T02020000B4/en -->
-    <territory id="WS" countryCode="685" internationalPrefix="0"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-      <!-- Should be formatted in one block, apart from the specific series below. For this reason
-           the leadingDigits is more detailed than would appear necessary. -->
-      <numberFormat pattern="(8[04]0)(\d{3,4})">
-        <leadingDigits>8[04]0</leadingDigits>
-        <format>$1 $2</format>
-      </numberFormat>
-      <numberFormat pattern="(7[25-7])(\d{5})">
-        <leadingDigits>7[25-7]</leadingDigits>
-        <format>$1 $2</format>
-      </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[2-8]\d{4,6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,7}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            [2-5]\d|
-            6[1-9]|
-            840\d
-          )\d{3}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{5,7}</possibleNumberPattern>
-        <exampleNumber>22123</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            60|
-            7[25-7]\d
-          )\d{4}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,7}</possibleNumberPattern>
-        <exampleNumber>601234</exampleNumber>
-      </mobile>
-      <tollFree>
-        <!-- The 800 number series is new, and is used by companies such as the ANZ bank in Samoa to
-             provide 24 hour eMerchant support. It is marked as "Customized Services" in the plan
-             for now, so may be also used for other purposes than toll free, but until we have
-             further evidence of these we will keep it as toll free. -->
-        <nationalNumberPattern>800\d{3}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6}</possibleNumberPattern>
-        <exampleNumber>800123</exampleNumber>
-      </tollFree>
-      <!-- Current research suggests other types of numbers are not used in Samoa. -->
-    </territory>
-
-    <!-- Yemen -->
-    <!-- http://www.itu.int/oth/T02020000E7/en -->
-    <territory id="YE" countryCode="967" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([1-7])(\d{3})(\d{3,4})">
-          <leadingDigits>
-            [1-6]|
-            7[24-68]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(7[137]\d)(\d{3})(\d{3})">
-          <leadingDigits>7[137]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-7]\d{6,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1(?:
-              7\d|
-              [2-68]
-            )|
-            2[2-68]|
-            3[2358]|
-            4[2-58]|
-            5[2-6]|
-            6[3-58]|
-            7[24-68]
-          )\d{5}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
-        <exampleNumber>1234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[137]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>712345678</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-    </territory>
-
-    <!-- Mayotte -->
-    <!-- Some information at http://en.wikipedia.org/wiki/Telephone_numbers_in_France - most from
-         collection of internet data.  http://www.comores-online.com/mwezinet/internet/262.htm
-         verifies the fixed-line prefixes, but the mobile prefixes listed here seem out of date.
-         -->
-    <territory id="YT" countryCode="262" internationalPrefix="00"
-      nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"
-      leadingDigits="269|63">
-      <!-- Formatting as per La Réunion. -->
-      <generalDesc>
-        <nationalNumberPattern>[268]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>2696[0-4]\d{4}</nationalNumberPattern>
-        <exampleNumber>269601234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>639\d{6}</nationalNumberPattern>
-        <exampleNumber>639123456</exampleNumber>
-      </mobile>
-      <!-- Same as in France. -->
-      <tollFree>
-        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
-        <exampleNumber>801234567</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- South Africa -->
-    <!-- http://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000C10001PDFE.pdf -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_South_Africa -->
-    <territory id="ZA" countryCode="27" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(860)(\d{3})(\d{3})">
-          <leadingDigits>860</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="([1-578]\d)(\d{3})(\d{4})">
-          <leadingDigits>
-            [1-57]|
-            8(?:
-              [0-57-9]|
-              6[1-9]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>
-          (?:
-            1[0-8]|
-            2[1-478]|
-            3[1-69]|
-            4\d|
-            5[1346-8]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
-        <exampleNumber>101234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>
-          (?:
-            7[1-4689]|
-            8[1-5789]
-          )\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>711234567</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>801234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>86[1-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>861234567</exampleNumber>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>860\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>860123456</exampleNumber>
-      </sharedCost>
-      <voip>
-        <nationalNumberPattern>87\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>871234567</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Zambia -->
-    <!-- http://www.itu.int/oth/T02020000E8/en -->
-    <territory id="ZM" countryCode="260" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([29]\d)(\d{7})">
-          <leadingDigits>[29]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(800)(\d{3})(\d{3})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[289]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>21[1-8]\d{6}</nationalNumberPattern>
-        <exampleNumber>211234567</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Adding extra prefixes 6[457-9] and 7[4-6] since SMS messages have been successfully
-             delivered to these numbers, and numbers like this can be found on the Internet. -->
-        <nationalNumberPattern>
-          9(?:
-            55|
-            6[4-9]|
-            7[4-9]
-          )\d{6}
-        </nationalNumberPattern>
-        <exampleNumber>955123456</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-        <exampleNumber>800123456</exampleNumber>
-      </tollFree>
-    </territory>
-
-    <!-- Zimbabwe -->
-    <!-- http://www.itu.int/oth/T02020000E9/en -->
-    <territory id="ZW" countryCode="263" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <!-- One-digit area codes -->
-        <numberFormat pattern="([49])(\d{3})(\d{2,5})">
-          <leadingDigits>
-            4|
-            9[2-9]
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Mobile numbers -->
-        <numberFormat pattern="([179]\d)(\d{3})(\d{3,4})">
-          <leadingDigits>
-            [19]1|
-            7
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Two-digit area codes -->
-        <numberFormat pattern="([1-356]\d)(\d{3,5})">
-          <leadingDigits>
-            1[3-9]|
-            2(?:
-              [1-469]|
-              0[0-35-9]|
-              [45][0-79]
-            )|
-            3(?:
-              0[0-79]|
-              1[0-689]|
-              [24-69]|
-              3[0-69]
-            )|
-            5(?:
-              [02-46-9]|
-              [15][0-69]
-            )|
-            6(?:
-              [0145]|
-              [29][0-79]|
-              3[0-689]|
-              [68][0-69]
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([1-356]\d)(\d{3})(\d{3})">
-          <leadingDigits>
-            1[3-9]|
-            2(?:
-              [1-469]|
-              0[0-35-9]|
-              [45][0-79]
-            )|
-            3(?:
-              0[0-79]|
-              1[0-689]|
-              [24-69]|
-              3[0-69]
-            )|
-            5(?:
-              [02-46-9]|
-              [15][0-69]
-            )|
-            6(?:
-              [0145]|
-              [29][0-79]|
-              3[0-689]|
-              [68][0-69]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Three-digit area codes -->
-        <numberFormat pattern="([2356]\d{2})(\d{3,5})">
-          <leadingDigits>
-            2(?:
-              [278]|
-              0[45]|
-              48
-            )|
-            3(?:
-              08|
-              17|
-              3[78]|
-              [78]
-            )|
-            5[15][78]|
-            6(?:
-              [29]8|
-              37|
-              [68][78]
-            )
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([2356]\d{2})(\d{3})(\d{3})">
-          <leadingDigits>
-            2(?:
-              [278]|
-              0[45]|
-              48
-            )|
-            3(?:
-              08|
-              17|
-              3[78]|
-              [78]
-            )|
-            5[15][78]|
-            6(?:
-              [29]8|
-              37|
-              [68][78]
-            )
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Four-digit area codes -->
-        <numberFormat pattern="([25]\d{3})(\d{3,5})">
-          <leadingDigits>
-            (?:
-              25|
-              54
-            )8
-          </leadingDigits>
-          <leadingDigits>
-            258[23]|
-            5483
-          </leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([25]\d{3})(\d{3})(\d{3})">
-          <leadingDigits>
-            (?:
-              25|
-              54
-            )8
-          </leadingDigits>
-          <leadingDigits>
-            258[23]|
-            5483
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- VOIP numbers -->
-        <numberFormat pattern="(8\d{3})(\d{6})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <!-- A complicated nationalNumberPattern is necessary here, since the numbers are extremely
-             variable in length and the possible prefixes clash with the country code. -->
-        <nationalNumberPattern>
-          2(?:
-            [012457-9]\d{3,8}|
-            6\d{3,6}
-          )|
-          [13-79]\d{4,8}|
-          86\d{8}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{3,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- Numbering is grouped by subscriber-number length. -->
-        <nationalNumberPattern>
-          (?:
-            1[3-9]|
-            2(?:
-              0[45]|
-              [16]|
-              2[28]|
-              [49]8?|
-              58[23]|
-              7[246]|
-              8[1346-9]
-            )|
-            3(?:
-              08?|
-              17?|
-              3[78]|
-              [2456]|
-              7[1569]|
-              8[379]
-            )|
-            5(?:
-              [07-9]|
-              1[78]|
-              483|
-              5(?:
-                7?|
-                8
-              )
-            )|
-            6(?:
-              0|
-              28|
-              37?|
-              [45][68][78]|
-              98?
-            )|
-            848
-          )\d{3,6}|
-          (?:
-            2(?:
-              27|
-              5|
-              7[135789]|
-              8[25]
-            )|
-            3[39]|
-            5[1-46]|
-            6[126-8]
-          )\d{4,6}|
-          2(?:
-            0|
-            70
-          )\d{5,6}|
-          (?:
-            4\d|
-            9[2-8]
-          )\d{4,7}
-        </nationalNumberPattern>
-        <exampleNumber>1312345</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[137]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>711234567</exampleNumber>
-      </mobile>
-      <!-- No tollFree or premiumRate information can be found. -->
-      <voip>
-        <nationalNumberPattern>
-          86(?:
-            1[12]|
-            22|
-            30|
-            44|
-            8[367]|
-            99
-          )\d{6}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>8686123456</exampleNumber>
-      </voip>
-    </territory>
-  </territories>
-</phoneNumberMetadata>
diff --git a/java/resources/com/google/i18n/phonenumbers/test/PhoneNumberMetaDataForTesting.xml b/java/resources/com/google/i18n/phonenumbers/test/PhoneNumberMetaDataForTesting.xml
deleted file mode 100644
index c01acf7..0000000
--- a/java/resources/com/google/i18n/phonenumbers/test/PhoneNumberMetaDataForTesting.xml
+++ /dev/null
@@ -1,754 +0,0 @@
-<!-- Copyright (C) 2009 Google Inc.
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
-
-     @author: Shaopeng Jia
-
-     MetaData on Phone Number Plan and formatting rules. This file is used
-     solely for the purpose of unittesting, so data in this file is not
-     necessarily consistent with that of
-     ../src/PhoneNumberMetaData.xml
--->
-
-<phoneNumberMetadata>
-  <territories>
-    <!-- Andorra -->
-    <territory id="AD" countryCode="376" internationalPrefix="00">
-    </territory>
-
-    <!-- Angola -->
-    <!-- This country has been coopted to test the case of a national prefix
-    with a non-numeric symbol in it. -->
-    <territory id="AO" countryCode="244" internationalPrefix="00" nationalPrefix="0~0">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[29]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>2\d(?:[26-9]\d|\d[26-9])\d{5}</nationalNumberPattern>
-        <exampleNumber>222123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <!-- Expanded the 92 prefix possibilities to matchnumbers found online. -->
-        <nationalNumberPattern>9[1-3]\d{7}</nationalNumberPattern>
-        <exampleNumber>923123456</exampleNumber>
-      </mobile>
-    </territory>
-
-    <!-- Argentina -->
-    <territory id="AR" countryCode="54" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"
-               nationalPrefixForParsing="0(?:(11|343|3715)15)?"
-               nationalPrefixTransformRule="9$1">
-      <!-- Note in nationalPrefixForParsing, the areacode (such as 11, 343, etc.), when present in
-           front of carrier selection code 15, is captured to replace $1 in
-           nationalPrefixTransformRule -->
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>11</leadingDigits>
-          <format>$1 $2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{4})(\d{2})(\d{4})">
-          <leadingDigits>1[02-9]|[23]</leadingDigits>
-          <format>$1 $2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="9(11)(\d{4})(\d{4})">
-          <leadingDigits>911</leadingDigits>
-          <format>$1 15 $2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="9(\d{4})(\d{2})(\d{4})"
-          carrierCodeFormattingRule="$NP$FG $CC">
-          <leadingDigits>9(?:1[02-9]|[23])</leadingDigits>
-          <format>$1 $2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>[68]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>11</leadingDigits>
-          <format>$1 $2-$3</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(\d{4})(\d{2})(\d{4})">
-          <leadingDigits>1[02-9]|[23]</leadingDigits>
-          <format>$1 $2-$3</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(9)(11)(\d{4})(\d{4})">
-          <leadingDigits>911</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(9)(\d{4})(\d{2})(\d{4})">
-          <leadingDigits>9(?:1[02-9]|[23])</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>[68]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-3689]\d{9,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-         <nationalNumberPattern>[1-3]\d{9}</nationalNumberPattern>
-         <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>9\d{10}|[1-3]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>6(0\d|10)\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </premiumRate>
-    </territory>
-
-    <!-- Australia -->
-    <territory id="AU" countryCode="61" internationalPrefix="001[12]"
-               nationalPrefix="0" preferredInternationalPrefix="0011"
-               nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat nationalPrefixFormattingRule="$FG"
-          pattern="(\d{4})(\d{3})(\d{3})" >
-          <leadingDigits>1</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{1})(\d{4})(\d{4})">
-          <leadingDigits>[2-478]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc >
-        <nationalNumberPattern>[1-578]\d{4,14}</nationalNumberPattern>
-        <possibleNumberPattern>\d{5,15}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[2378]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>4\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>1800\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>190[0126]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </premiumRate>
-    </territory>
-
-    <!-- Bahamas -->
-    <territory id="BS" countryCode="1" internationalPrefix="011"
-               nationalPrefix="1">
-      <generalDesc>
-        <nationalNumberPattern>(242|8(00|66|77|88)|900)\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[3-57]|9[2-5])|4(?:2[237]|51|64|77)|502|636|702)\d{4}</nationalNumberPattern>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>242(357|359|457|557)\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>8(00|66|77|88)\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </premiumRate>
-    </territory>
-
-    <!-- Germany -->
-    <territory id="DE" countryCode="49" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{3,8})">
-          <leadingDigits>2|3[3-9]|906|[4-9][1-9]1</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{4,9})">
-          <leadingDigits>[34]0|[68]9</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <!-- Extra fictional pattern for shorter numbers with the same prefixes as the following
-             pattern, to illustrate the problem the AYTF has with real patterns that share this
-             property. -->
-        <numberFormat pattern="([4-9]\d)(\d{2})">
-          <leadingDigits>[4-9]</leadingDigits>
-          <leadingDigits>[4-6]|[7-9](?:\d[1-9]|[1-9]\d)</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="([4-9]\d{3})(\d{2,7})">
-          <leadingDigits>[4-9]</leadingDigits>
-          <leadingDigits>[4-6]|[7-9](?:\d[1-9]|[1-9]\d)</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{1})(\d{6})">
-          <leadingDigits>800</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3,4})(\d{4})">
-          <leadingDigits>900</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{4,14}</nationalNumberPattern>
-        <possibleNumberPattern>\d{2,14}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>(?:[24-6]\d{2}|3[03-9]\d|[789](?:[1-9]\d|0[2-9]))\d{3,8}</nationalNumberPattern>
-        <exampleNumber>30123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>1(5\d{9}|7\d{8}|6[02]\d{8}|63\d{7})</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900([135]\d{6}|9\d{7})</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-      </premiumRate>
-    </territory>
-
-    <!-- United Kingdom -->
-    <territory id="GB" countryCode="44" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>[1-59]|[78]0</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{3})(\d{3})(\d{3})">
-          <leadingDigits>6</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{4})(\d{3})(\d{3})">
-          <leadingDigits>7[1-57-9]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>8[47]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>\d{10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[1-6]\d{9}</nationalNumberPattern>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>7[1-57-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>9[018]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </premiumRate>
-      <sharedCost>
-        <nationalNumberPattern>8(?:4[3-5]|7[0-2])\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </sharedCost>
-      <voip>
-        <nationalNumberPattern>56\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </voip>
-      <personalNumber>
-        <nationalNumberPattern>70\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </personalNumber>
-    </territory>
-
-    <!-- Italy -->
-    <!-- http://en.wikipedia.org/wiki/%2B39 -->
-    <territory id="IT" countryCode="39" internationalPrefix="00">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>0[26]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{4})(\d{3,4})">
-          <leadingDigits>0[13-57-9]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})">
-          <leadingDigits>3</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3,6})">
-          <leadingDigits>8</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[0389]\d{5,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>0\d{9,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>3\d{8,9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80(?:0\d{6}|3\d{3})</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>89(?:2\d{3}|9\d{6})</nationalNumberPattern>
-        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
-      </premiumRate>
-    </territory>
-
-    <!-- Japan -->
-    <!-- The metadata here is added to unit test AsYouTypeFormatter for JP, which requires switching
-         patterns as digits beyond the third one are entered. As a result, only a few fake
-         formatting rules are added. -->
-    <territory id="JP" countryCode="81" internationalPrefix="010"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>[57-9]0</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
-          <leadingDigits>222|333</leadingDigits>
-          <leadingDigits>(?:222|333)1</leadingDigits>
-          <leadingDigits>(?:222|333)11</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{4})(\d)(\d{4})">
-          <leadingDigits>222|333</leadingDigits>
-          <leadingDigits>2221|3332</leadingDigits>
-          <leadingDigits>22212|3332</leadingDigits>
-          <leadingDigits>222120|3332</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{4})">
-          <leadingDigits>[23]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-    </territory>
-
-    <!-- Korea (Rep. of) -->
-    <!-- http://www.itu.int/oth/T0202000072/en -->
-    <!-- http://en.wikipedia.org/wiki/%2B82 -->
-    <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boardId=1074&boardSeq=2349 -->
-    <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boardId=1074&boardSeq=2240 -->
-    <!-- http://www.telecentro.co.kr/sub/index.php?job=detail&ebcf_id=faq&page=1&mid=0503&eb_seq=36 -->
-    <!-- Exceptions :
-        internationalPrefix
-            0031, 0033, 0071, 0073 - Special services of KT and DACOM, ignorable
-        nationalPrefix
-            1[4-6]XX-YYYY - Country-wide common number services, display as it is without hyphens -->
-    <territory id="KR" countryCode="82" internationalPrefix="00(?:[124-68]|[37]\d{2})"
-               nationalPrefix="0" nationalPrefixForParsing="0(8[1-46-8]|85\d{2})?"
-               nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>1(?:0|1[19]|[69]9|5[458])|[57]0</leadingDigits>
-          <leadingDigits>1(?:0|1[19]|[69]9|5(?:44|59|8))|[57]0</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
-          <leadingDigits>1(?:[169][2-8]|[78]|5[1-4])|[68]0|[3-9][1-9][2-9]</leadingDigits>
-          <leadingDigits>1(?:[169][2-8]|[78]|5(?:[1-3]|4[56]))|[68]0|[3-9][1-9][2-9]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d)(\d{4})">
-          <leadingDigits>131</leadingDigits>
-          <leadingDigits>1312</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{2})(\d{4})">
-          <leadingDigits>131</leadingDigits>
-          <leadingDigits>131[13-9]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>13[2-9]</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{2})(\d{3})(\d{4})">
-          <leadingDigits>30</leadingDigits>
-          <format>$1-$2-$3-$4</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{4})(\d{4})">
-          <leadingDigits>2(?:[26]|3[0-467])</leadingDigits>
-          <leadingDigits>2(?:[26]|3(?:01|1[45]|2[17-9]|39|4|6[67]|7[078]))</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{3})(\d{4})">
-          <leadingDigits>2(?:3[0-35-9]|[457-9])</leadingDigits>
-          <leadingDigits>2(?:3(?:0[02-9]|1[0-36-9]|2[02-6]|3[0-8]|6[0-589]|7[1-69]|[589])|[457-9])</leadingDigits>
-          <format>$1-$2-$3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{3})">
-          <leadingDigits>21[0-46-9]</leadingDigits>
-          <leadingDigits>21(?:[0-247-9]|3[124]|6[1269])</leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{4})">
-          <leadingDigits>21[36]</leadingDigits>
-          <leadingDigits>21(?:3[035-9]|6[03-578])</leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{3})">
-          <leadingDigits>[3-9][1-9]1</leadingDigits>
-          <leadingDigits>[3-9][1-9]1(?:[0-46-9])</leadingDigits>
-          <leadingDigits>[3-9][1-9]1(?:[0-247-9]|3[124]|6[1269])</leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{4})">
-          <leadingDigits>[3-9][1-9]1</leadingDigits>
-          <leadingDigits>[3-9][1-9]1[36]</leadingDigits>
-          <leadingDigits>[3-9][1-9]1(?:3[035-9]|6[03-578])</leadingDigits>
-          <format>$1-$2</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-79]\d{3,9}|8\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>(?:2|[34][1-3]|5[1-5]|6[1-4])(?:1\d{2,3}|[2-9]\d{6,7})</nationalNumberPattern>
-        <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
-        <exampleNumber>22123456</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>1[0-25-9]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>1023456789</exampleNumber>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>801234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>60[2-9]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>602345678</exampleNumber>
-      </premiumRate>
-      <personalNumber>
-        <nationalNumberPattern>50\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>5012345678</exampleNumber>
-      </personalNumber>
-      <voip>
-        <nationalNumberPattern>70\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-        <exampleNumber>7012345678</exampleNumber>
-      </voip>
-    </territory>
-
-    <!-- Mexico -->
-    <territory id="MX" countryCode="52" internationalPrefix="00"
-               nationalPrefix="01" nationalPrefixForParsing="01|04[45](\d{10})"
-               nationalPrefixTransformRule="1$1">
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>[89]00</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>33|55|81</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>[2467]|3[0-24-9]|5[0-46-9]|8[2-9]|9[1-9]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="1(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>1(?:33|55|81)</leadingDigits>
-          <format>045 $1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="1(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>1(?:[124579]|3[0-24-9]|5[0-46-9]|8[02-9])</leadingDigits>
-          <format>045 $1 $2 $3</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>[89]00</leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>33|55|81</leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>[2467]|3[0-24-9]|5[0-46-9]|8[2-9]|9[1-9]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(1)(\d{2})(\d{4})(\d{4})">
-          <leadingDigits>1(?:33|55|81)</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-        <intlNumberFormat pattern="(1)(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>1(?:[124579]|3[0-24-9]|5[0-46-9]|8[02-9])</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{9,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[2-9]\d{9}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>1\d{10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </premiumRate>
-    </territory>
-
-    <!-- New Zealand -->
-    <territory id="NZ" countryCode="64" internationalPrefix="00"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d)(\d{3})(\d{4})">
-          <leadingDigits>24|[34679]</leadingDigits>
-          <format>$1-$2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d)(\d{3})(\d{3,5})">
-          <leadingDigits>2[179]</leadingDigits>
-          <format>$1-$2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})">
-          <leadingDigits>[89]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>
-          [289]\d{7,9}|
-          [3-7]\d{7}
-        </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>24099\d{3}|(?:3[2-79]|[479][2-689]|6[235-9])\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>2(?:[027]\d{7}|9\d{6,7}|1(?:0\d{5,7}|[12]\d{5,6}|[3-9]\d{5})|4[1-9]\d{6}|8\d{7,8})</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{6,7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-      </premiumRate>
-    </territory>
-
-    <!-- Poland -->
-    <!-- http://en.wikipedia.org/wiki/%2B48 -->
-    <territory id="PL" countryCode="48" internationalPrefix="0~0"
-               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <mobile>
-        <nationalNumberPattern>(?:5[01]|6[069]|7[289]|88)\d{7}</nationalNumberPattern>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>70\d{7}</nationalNumberPattern>
-      </premiumRate>
-    </territory>
-
-    <!-- Réunion (French Departments and Territories in the Indian Ocean) -->
-    <!-- Note this shares the same country code as La Mayotte and French
-    Southern Territories, and the formatting patterns here are used by all of
-    them. This is present to test leadingDigits. -->
-    <territory id="RE" countryCode="262" leadingDigits="262|6(?:9[23]|47)|8"
-               internationalPrefix="00" nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <availableFormats>
-        <numberFormat pattern="([268]\d{2})(\d{2})(\d{2})(\d{2})">
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[268]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <!-- 0876 numbers are mentioned in the plan, but none in use can be
-        found. -->
-        <nationalNumberPattern>262\d{6}</nationalNumberPattern>
-        <exampleNumber>262161234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>6(?:9[23]|47)\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>692123456</exampleNumber>
-      </mobile>
-      <!-- 08* Numbers in Réunion are the same as those valid in France. -->
-      <tollFree>
-        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
-        <exampleNumber>801234567</exampleNumber>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>8(?:1[01]|2[0156]|84|9[0-37-9])\d{6}</nationalNumberPattern>
-        <exampleNumber>810123456</exampleNumber>
-      </premiumRate>
-    </territory>
-
-    <!-- Singapore -->
-    <!-- http://www.ida.gov.sg/policies%20and%20regulation/20060508120124.aspx -->
-    <territory id="SG" countryCode="65" internationalPrefix="0[0-3][0-9]">
-      <availableFormats>
-        <numberFormat pattern="(\d{4})(\d{4})">
-          <leadingDigits>[369]|8[1-9]</leadingDigits>
-          <format>$1 $2</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{4})(\d{3})(\d{4})">
-          <leadingDigits>1[89]</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <leadingDigits>800</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[13689]\d{7,10}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,11}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>[36]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>[89]\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8}</possibleNumberPattern>
-      </mobile>
-      <tollFree>
-        <nationalNumberPattern>1?800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>1900\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{11}</possibleNumberPattern>
-      </premiumRate>
-    </territory>
-
-    <!-- United States -->
-    <!-- http://www.nanpa.com/reports/reports_npa.html -->
-    <!-- For testing purposes, numbers starting with 24 are not considered US
-    numbers.-->
-    <territory id="US" countryCode="1" internationalPrefix="011"
-               preferredExtnPrefix=" extn. " nationalPrefix="1"
-               mainCountryForCode="true" >
-      <availableFormats>
-        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(\d{3})(\d{4})">
-          <format>$1 $2</format>
-        </numberFormat>
-        <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
-          <format>$1 $2 $3</format>
-        </intlNumberFormat>
-      </availableFormats>
-      <generalDesc>
-        <nationalNumberPattern>[13-9]\d{9}|2[0-35-9]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
-        <exampleNumber>1234567890</exampleNumber>
-      </generalDesc>
-      <noInternationalDialling>
-        <!-- This range is added for testing purposes only. -->
-        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </noInternationalDialling>
-      <tollFree>
-        <nationalNumberPattern>8(?:00|66|77|88)\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </tollFree>
-      <premiumRate>
-        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
-        <possibleNumberPattern>\d{10}</possibleNumberPattern>
-      </premiumRate>
-    </territory>
-
-    <!-- Mayotte -->
-    <territory id="YT" countryCode="262" leadingDigits="269|639"
-               internationalPrefix="00" nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
-      <!-- Formatting as per La Réunion. -->
-      <generalDesc>
-        <nationalNumberPattern>[268]\d{8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{9}</possibleNumberPattern>
-      </generalDesc>
-      <fixedLine>
-        <nationalNumberPattern>2696[0-4]\d{4}</nationalNumberPattern>
-        <exampleNumber>269601234</exampleNumber>
-      </fixedLine>
-      <mobile>
-        <nationalNumberPattern>639\d{6}</nationalNumberPattern>
-        <exampleNumber>639123456</exampleNumber>
-      </mobile>
-      <!-- Same as in France. -->
-      <tollFree>
-        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
-        <exampleNumber>801234567</exampleNumber>
-      </tollFree>
-    </territory>
-  </territories>
-</phoneNumberMetadata>
diff --git a/java/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java b/java/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java
index 11b8ba0..806ecc9 100644
--- a/java/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java
+++ b/java/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java
@@ -28,28 +28,31 @@
 /**
  * A formatter which formats phone numbers as they are entered.
  *
- * An AsYouTypeFormatter could be created by invoking the getAsYouTypeFormatter method of the
- * PhoneNumberUtil. After that digits could be added by invoking the inputDigit method on the
- * formatter instance, and the partially formatted phone number will be returned each time a digit
- * is added. The clear method could be invoked before a new number needs to be formatted.
+ * <p>An AsYouTypeFormatter can be created by invoking
+ * {@link PhoneNumberUtil#getAsYouTypeFormatter}. After that, digits can be added by invoking
+ * {@link #inputDigit} on the formatter instance, and the partially formatted phone number will be
+ * returned each time a digit is added. {@link #clear} can be invoked before formatting a new
+ * number.
  *
- * See testAsYouTypeFormatterUS(), testAsYouTestFormatterGB() and testAsYouTypeFormatterDE() in
- * PhoneNumberUtilTest.java for more details on how the formatter is to be used.
+ * <p>See the unittests for more details on how the formatter is to be used.
  *
  * @author Shaopeng Jia
  */
 public class AsYouTypeFormatter {
   private String currentOutput = "";
-  private StringBuffer formattingTemplate = new StringBuffer();
+  private StringBuilder formattingTemplate = new StringBuilder();
   // The pattern from numberFormat that is currently used to create formattingTemplate.
   private String currentFormattingPattern = "";
-  private StringBuffer accruedInput = new StringBuffer();
-  private StringBuffer accruedInputWithoutFormatting = new StringBuffer();
+  private StringBuilder accruedInput = new StringBuilder();
+  private StringBuilder accruedInputWithoutFormatting = new StringBuilder();
   private boolean ableToFormat = true;
   private boolean isInternationalFormatting = false;
-  private boolean isExpectingCountryCode = false;
+  private boolean isExpectingCountryCallingCode = false;
   private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
   private String defaultCountry;
+
+  private static final PhoneMetadata EMPTY_METADATA =
+      new PhoneMetadata().setInternationalPrefix("NA");
   private PhoneMetadata defaultMetaData;
   private PhoneMetadata currentMetaData;
 
@@ -63,6 +66,15 @@
   // the phone number can be as long as 15 digits.
   private static final Pattern STANDALONE_DIGIT_PATTERN = Pattern.compile("\\d(?=[^,}][^,}])");
 
+  // A pattern that is used to determine if a numberFormat under availableFormats is eligible to be
+  // used by the AYTF. It is eligible when the format element under numberFormat contains groups of
+  // the dollar sign followed by a single digit, separated by valid phone number punctuation. This
+  // prevents invalid punctuation (such as the star sign in Israeli star numbers) getting into the
+  // output of the AYTF.
+  private static final Pattern ELIGIBLE_FORMAT_PATTERN =
+      Pattern.compile("[" + PhoneNumberUtil.VALID_PUNCTUATION + "]*" +
+          "(\\$\\d" + "[" + PhoneNumberUtil.VALID_PUNCTUATION + "]*)+");
+
   // This is the minimum length of national number accrued that is required to trigger the
   // formatter. The first element of the leadingDigitsPattern of each numberFormat contains a
   // regular expression that matches up to this number of digits.
@@ -79,10 +91,8 @@
   // The position of a digit upon which inputDigitAndRememberPosition is most recently invoked, as
   // found in accruedInputWithoutFormatting.
   private int positionToRemember = 0;
-  private Pattern nationalPrefixForParsing;
-  private Pattern internationalPrefix;
-  private StringBuffer prefixBeforeNationalNumber = new StringBuffer();
-  private StringBuffer nationalNumber = new StringBuffer();
+  private StringBuilder prefixBeforeNationalNumber = new StringBuilder();
+  private StringBuilder nationalNumber = new StringBuilder();
   private List<NumberFormat> possibleFormats = new ArrayList<NumberFormat>();
 
     // A cache for frequently used country-specific regular expressions.
@@ -96,21 +106,18 @@
    */
   AsYouTypeFormatter(String regionCode) {
     defaultCountry = regionCode;
-    initializeCountrySpecificInfo(defaultCountry);
+    currentMetaData = getMetadataForRegion(defaultCountry);
     defaultMetaData = currentMetaData;
   }
 
-  private void initializeCountrySpecificInfo(String regionCode) {
-    currentMetaData = phoneUtil.getMetadataForRegion(regionCode);
-    if (currentMetaData == null) {
-      // Set to a default instance of the metadata. This allows us to function with an incorrect
-      // region code, even if formatting only works for numbers specified with "+".
-      currentMetaData = new PhoneMetadata().setInternationalPrefix("NA");
+  private PhoneMetadata getMetadataForRegion(String regionCode) {
+    PhoneMetadata metadata = phoneUtil.getMetadataForRegion(regionCode);
+    if (metadata != null) {
+      return metadata;
     }
-    nationalPrefixForParsing =
-        regexCache.getPatternForRegex(currentMetaData.getNationalPrefixForParsing());
-    internationalPrefix =
-        regexCache.getPatternForRegex("\\+|" + currentMetaData.getInternationalPrefix());
+    // Set to a default instance of the metadata. This allows us to function with an incorrect
+    // region code, even if formatting only works for numbers specified with "+".
+    return EMPTY_METADATA;
   }
 
   // Returns true if a new template is created as opposed to reusing the existing template.
@@ -133,20 +140,27 @@
 
   private void getAvailableFormats(String leadingThreeDigits) {
     List<NumberFormat> formatList =
-        (isInternationalFormatting && currentMetaData.getIntlNumberFormatCount() > 0)
-        ? currentMetaData.getIntlNumberFormatList()
-        : currentMetaData.getNumberFormatList();
-    possibleFormats.addAll(formatList);
+        (isInternationalFormatting && currentMetaData.intlNumberFormatSize() > 0)
+        ? currentMetaData.intlNumberFormats()
+        : currentMetaData.numberFormats();
+    for (NumberFormat format : formatList) {
+      if (isFormatEligible(format.getFormat())) {
+        possibleFormats.add(format);
+      }
+    }
     narrowDownPossibleFormats(leadingThreeDigits);
   }
 
+  private boolean isFormatEligible(String format) {
+    return ELIGIBLE_FORMAT_PATTERN.matcher(format).matches();
+  }
+
   private void narrowDownPossibleFormats(String leadingDigits) {
-    int lengthOfLeadingDigits = leadingDigits.length();
-    int indexOfLeadingDigitsPattern = lengthOfLeadingDigits - MIN_LEADING_DIGITS_LENGTH;
+    int indexOfLeadingDigitsPattern = leadingDigits.length() - MIN_LEADING_DIGITS_LENGTH;
     Iterator<NumberFormat> it = possibleFormats.iterator();
     while (it.hasNext()) {
       NumberFormat format = it.next();
-      if (format.getLeadingDigitsPatternCount() > indexOfLeadingDigitsPattern) {
+      if (format.leadingDigitsPatternSize() > indexOfLeadingDigitsPattern) {
         Pattern leadingDigitsPattern =
             regexCache.getPatternForRegex(
                 format.getLeadingDigitsPattern(indexOfLeadingDigitsPattern));
@@ -160,7 +174,6 @@
   }
 
   private boolean createFormattingTemplate(NumberFormat format) {
-    String numberFormat = format.getFormat();
     String numberPattern = format.getPattern();
 
     // The formatter doesn't format numbers when numberPattern contains "|", e.g.
@@ -175,7 +188,7 @@
     // Replace any standalone digit (not the one in d{}) with \d
     numberPattern = STANDALONE_DIGIT_PATTERN.matcher(numberPattern).replaceAll("\\\\d");
     formattingTemplate.setLength(0);
-    String tempTemplate = getFormattingTemplate(numberPattern, numberFormat);
+    String tempTemplate = getFormattingTemplate(numberPattern, format.getFormat());
     if (tempTemplate.length() > nationalNumber.length()) {
       formattingTemplate.append(tempTemplate);
       return true;
@@ -183,7 +196,7 @@
     return false;
   }
 
-  // Gets a formatting template which could be used to efficiently format a partial number where
+  // Gets a formatting template which can be used to efficiently format a partial number where
   // digits are added one by one.
   private String getFormattingTemplate(String numberPattern, String numberFormat) {
     // Creates a phone number consisting only of the digit 9 that matches the
@@ -200,7 +213,7 @@
   }
 
   /**
-   * Clears the internal state of the formatter, so it could be reused.
+   * Clears the internal state of the formatter, so it can be reused.
    */
   public void clear() {
     currentOutput = "";
@@ -215,10 +228,10 @@
     positionToRemember = 0;
     originalPosition = 0;
     isInternationalFormatting = false;
-    isExpectingCountryCode = false;
+    isExpectingCountryCallingCode = false;
     possibleFormats.clear();
     if (!currentMetaData.equals(defaultMetaData)) {
-      initializeCountrySpecificInfo(defaultCountry);
+      currentMetaData = getMetadataForRegion(defaultCountry);
     }
   }
 
@@ -226,8 +239,9 @@
    * Formats a phone number on-the-fly as each digit is entered.
    *
    * @param nextChar  the most recently entered digit of a phone number. Formatting characters are
-   *     allowed, but they are removed from the result. Full width digits and Arabic-indic digits
-   *     are allowed, and will be shown as they are.
+   *     allowed, but as soon as they are encountered this method formats the number as entered and
+   *     not "as you type" anymore. Full width digits and Arabic-indic digits are allowed, and will
+   *     be shown as they are.
    * @return  the partially formatted phone number.
    */
   public String inputDigit(char nextChar) {
@@ -236,9 +250,10 @@
   }
 
   /**
-   * Same as inputDigit, but remembers the position where nextChar is inserted, so that it could be
-   * retrieved later by using getRememberedPosition(). The remembered position will be automatically
-   * adjusted if additional formatting characters are later inserted/removed in front of nextChar.
+   * Same as {@link #inputDigit}, but remembers the position where {@code nextChar} is inserted, so
+   * that it can be retrieved later by using {@link #getRememberedPosition}. The remembered
+   * position will be automatically adjusted if additional formatting characters are later
+   * inserted/removed in front of {@code nextChar}.
    */
   public String inputDigitAndRememberPosition(char nextChar) {
     currentOutput = inputDigitWithOptionToRememberPosition(nextChar, true);
@@ -265,29 +280,29 @@
     // We start to attempt to format only when at least MIN_LEADING_DIGITS_LENGTH digits (the plus
     // sign is counted as a digit as well for this purpose) have been entered.
     switch (accruedInputWithoutFormatting.length()) {
-      case 0: // this is the case where the first few inputs are neither digits nor the plus sign.
+      case 0:
       case 1:
       case 2:
         return accruedInput.toString();
       case 3:
         if (attemptToExtractIdd()) {
-          isExpectingCountryCode = true;
+          isExpectingCountryCallingCode = true;
         } else {  // No IDD or plus sign is found, must be entering in national format.
           removeNationalPrefixFromNationalNumber();
           return attemptToChooseFormattingPattern();
         }
       case 4:
       case 5:
-        if (isExpectingCountryCode) {
-          if (attemptToExtractCountryCode()) {
-            isExpectingCountryCode = false;
+        if (isExpectingCountryCallingCode) {
+          if (attemptToExtractCountryCallingCode()) {
+            isExpectingCountryCallingCode = false;
           }
           return prefixBeforeNationalNumber + nationalNumber.toString();
         }
-      // We make a last attempt to extract a country code at the 6th digit because the maximum
-      // length of IDD and country code are both 3.
+      // We make a last attempt to extract a country calling code at the 6th digit because the
+      // maximum length of IDD and country calling code are both 3.
       case 6:
-        if (isExpectingCountryCode && !attemptToExtractCountryCode()) {
+        if (isExpectingCountryCallingCode && !attemptToExtractCountryCallingCode()) {
           ableToFormat = false;
           return accruedInput.toString();
         }
@@ -326,22 +341,19 @@
 
   /**
    * Returns the current position in the partially formatted phone number of the character which was
-   * previously passed in as the parameter of inputDigitAndRememberPosition().
+   * previously passed in as the parameter of {@link #inputDigitAndRememberPosition}.
    */
   public int getRememberedPosition() {
     if (!ableToFormat) {
       return originalPosition;
     }
     int accruedInputIndex = 0, currentOutputIndex = 0;
-    int currentOutputLength = currentOutput.length();
-    while (accruedInputIndex < positionToRemember && currentOutputIndex < currentOutputLength) {
+    while (accruedInputIndex < positionToRemember && currentOutputIndex < currentOutput.length()) {
       if (accruedInputWithoutFormatting.charAt(accruedInputIndex) ==
           currentOutput.charAt(currentOutputIndex)) {
         accruedInputIndex++;
-        currentOutputIndex++;
-      } else {
-        currentOutputIndex++;
       }
+      currentOutputIndex++;
     }
     return currentOutputIndex;
   }
@@ -384,6 +396,8 @@
       prefixBeforeNationalNumber.append("1 ");
       isInternationalFormatting = true;
     } else if (currentMetaData.hasNationalPrefix()) {
+      Pattern nationalPrefixForParsing =
+        regexCache.getPatternForRegex(currentMetaData.getNationalPrefixForParsing());
       Matcher m = nationalPrefixForParsing.matcher(nationalNumber);
       if (m.lookingAt()) {
         // When the national prefix is detected, we use international formatting rules instead of
@@ -405,14 +419,17 @@
    *     defaultCountry.
    */
   private boolean attemptToExtractIdd() {
+    Pattern internationalPrefix =
+        regexCache.getPatternForRegex("\\" + PhoneNumberUtil.PLUS_SIGN + "|" +
+            currentMetaData.getInternationalPrefix());
     Matcher iddMatcher = internationalPrefix.matcher(accruedInputWithoutFormatting);
     if (iddMatcher.lookingAt()) {
       isInternationalFormatting = true;
-      int startOfCountryCode = iddMatcher.end();
+      int startOfCountryCallingCode = iddMatcher.end();
       nationalNumber.setLength(0);
-      nationalNumber.append(accruedInputWithoutFormatting.substring(startOfCountryCode));
+      nationalNumber.append(accruedInputWithoutFormatting.substring(startOfCountryCallingCode));
       prefixBeforeNationalNumber.append(
-          accruedInputWithoutFormatting.substring(0, startOfCountryCode));
+          accruedInputWithoutFormatting.substring(0, startOfCountryCallingCode));
       if (accruedInputWithoutFormatting.charAt(0) != PhoneNumberUtil.PLUS_SIGN) {
         prefixBeforeNationalNumber.append(" ");
       }
@@ -422,41 +439,41 @@
   }
 
   /**
-   * Extracts country code from the beginning of nationalNumber to prefixBeforeNationalNumber when
-   * they are available, and places the remaining input into nationalNumber.
+   * Extracts the country calling code from the beginning of nationalNumber to
+   * prefixBeforeNationalNumber when they are available, and places the remaining input into
+   * nationalNumber.
    *
-   * @return  true when a valid country code can be found.
+   * @return  true when a valid country calling code can be found.
    */
-  private boolean attemptToExtractCountryCode() {
+  private boolean attemptToExtractCountryCallingCode() {
     if (nationalNumber.length() == 0) {
       return false;
     }
-    StringBuffer numberWithoutCountryCode = new StringBuffer();
-    int countryCode = phoneUtil.extractCountryCode(nationalNumber, numberWithoutCountryCode);
+    StringBuilder numberWithoutCountryCallingCode = new StringBuilder();
+    int countryCode = phoneUtil.extractCountryCode(nationalNumber, numberWithoutCountryCallingCode);
     if (countryCode == 0) {
       return false;
-    } else {
-      nationalNumber.setLength(0);
-      nationalNumber.append(numberWithoutCountryCode);
-      String newRegionCode = phoneUtil.getRegionCodeForCountryCode(countryCode);
-      if (!newRegionCode.equals(defaultCountry)) {
-        initializeCountrySpecificInfo(newRegionCode);
-      }
-      String countryCodeString = Integer.toString(countryCode);
-      prefixBeforeNationalNumber.append(countryCodeString).append(" ");
     }
+    nationalNumber.setLength(0);
+    nationalNumber.append(numberWithoutCountryCallingCode);
+    String newRegionCode = phoneUtil.getRegionCodeForCountryCode(countryCode);
+    if (newRegionCode != defaultCountry) {
+      currentMetaData = getMetadataForRegion(newRegionCode);
+    }
+    String countryCodeString = Integer.toString(countryCode);
+    prefixBeforeNationalNumber.append(countryCodeString).append(" ");
     return true;
   }
 
   // Accrues digits and the plus sign to accruedInputWithoutFormatting for later use. If nextChar
   // contains a digit in non-ASCII format (e.g. the full-width version of digits), it is first
   // normalized to the ASCII version. The return value is nextChar itself, or its normalized
-  // version, if nextChar is a digit in non-ASCII format.
+  // version, if nextChar is a digit in non-ASCII format. This method assumes its input is either a
+  // digit or the plus sign.
   private char normalizeAndAccrueDigitsAndPlusSign(char nextChar, boolean rememberPosition) {
     if (nextChar == PhoneNumberUtil.PLUS_SIGN) {
       accruedInputWithoutFormatting.append(nextChar);
-    }
-    if (PhoneNumberUtil.DIGIT_MAPPINGS.containsKey(nextChar)) {
+    } else {
       nextChar = PhoneNumberUtil.DIGIT_MAPPINGS.get(nextChar);
       accruedInputWithoutFormatting.append(nextChar);
       nationalNumber.append(nextChar);
diff --git a/java/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java b/java/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java
index 8d4b1f9..e67217c 100644
--- a/java/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java
+++ b/java/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java
@@ -132,8 +132,9 @@
     listWithRegionCode.add("SE");
     countryCodeToRegionCodeMap.put(46, listWithRegionCode);
 
-    listWithRegionCode = new ArrayList<String>(1);
+    listWithRegionCode = new ArrayList<String>(2);
     listWithRegionCode.add("NO");
+    listWithRegionCode.add("SJ");
     countryCodeToRegionCodeMap.put(47, listWithRegionCode);
 
     listWithRegionCode = new ArrayList<String>(1);
@@ -180,8 +181,10 @@
     listWithRegionCode.add("MY");
     countryCodeToRegionCodeMap.put(60, listWithRegionCode);
 
-    listWithRegionCode = new ArrayList<String>(1);
+    listWithRegionCode = new ArrayList<String>(3);
     listWithRegionCode.add("AU");
+    listWithRegionCode.add("CC");
+    listWithRegionCode.add("CX");
     countryCodeToRegionCodeMap.put(61, listWithRegionCode);
 
     listWithRegionCode = new ArrayList<String>(1);
@@ -514,8 +517,9 @@
     listWithRegionCode.add("CY");
     countryCodeToRegionCodeMap.put(357, listWithRegionCode);
 
-    listWithRegionCode = new ArrayList<String>(1);
+    listWithRegionCode = new ArrayList<String>(2);
     listWithRegionCode.add("FI");
+    listWithRegionCode.add("AX");
     countryCodeToRegionCodeMap.put(358, listWithRegionCode);
 
     listWithRegionCode = new ArrayList<String>(1);
diff --git a/java/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java b/java/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java
index 1905b5e..68ad3ad 100644
--- a/java/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java
+++ b/java/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java
@@ -54,12 +54,6 @@
    */
   private static final Pattern PATTERN;
   /**
-   * A phone number pattern that does not allow whitespace as punctuation. This pattern is only used
-   * in a second attempt to find a phone number occurring in the context of other numbers, such as
-   * when the preceding or following token is a zip code.
-   */
-  private static final Pattern INNER;
-  /**
    * Matches strings that look like publication pages. Example:
    * <pre>Computing Complete Answers to Queries in the Presence of Limited Access Patterns.
    * Chen Li. VLDB J. 12(3): 211-227 (2003).</pre>
@@ -68,9 +62,46 @@
    */
   private static final Pattern PUB_PAGES = Pattern.compile("\\d{1,5}-+\\d{1,5}\\s{0,4}\\(\\d{1,4}");
 
+  /**
+   * Matches strings that look like dates using "/" as a separator. Examples: 3/10/2011, 31/10/96 or
+   * 08/31/95.
+   */
+  private static final Pattern SLASH_SEPARATED_DATES =
+      Pattern.compile("(?:(?:[0-3]?\\d/[01]?\\d)|(?:[01]?\\d/[0-3]?\\d))/(?:[12]\\d)?\\d{2}");
+
+  /**
+   * Pattern to check that brackets match. Opening brackets should be closed within a phone number.
+   * This also checks that there is something inside the brackets. Having no brackets at all is also
+   * fine.
+   */
+  private static final Pattern MATCHING_BRACKETS;
+
+  /**
+   * Matches white-space, which may indicate the end of a phone number and the start of something
+   * else (such as a neighbouring zip-code).
+   */
+  private static final Pattern GROUP_SEPARATOR = Pattern.compile("\\p{Z}+");
+
   static {
-    /* Builds the PATTERN and INNER regular expression patterns. The building blocks below
-     * exist to make the patterns more easily understood. */
+    /* Builds the MATCHING_BRACKETS and PATTERN regular expressions. The building blocks below exist
+     * to make the pattern more easily understood. */
+
+    String openingParens = "(\\[\uFF08\uFF3B";
+    String closingParens = ")\\]\uFF09\uFF3D";
+    String nonParens = "[^" + openingParens + closingParens + "]";
+
+    /* Limit on the number of pairs of brackets in a phone number. */
+    String bracketPairLimit = limit(0, 3);
+    /*
+     * An opening bracket at the beginning may not be closed, but subsequent ones should be.  It's
+     * also possible that the leading bracket was dropped, so we shouldn't be surprised if we see a
+     * closing bracket first. We limit the sets of brackets in a phone number to four.
+     */
+    MATCHING_BRACKETS = Pattern.compile(
+        "(?:[" + openingParens + "])?" + "(?:" + nonParens + "+" + "[" + closingParens + "])?" +
+        nonParens + "+" +
+        "(?:[" + openingParens + "]" + nonParens + "+[" + closingParens + "])" + bracketPairLimit +
+        nonParens + "*");
 
     /* Limit on the number of leading (plus) characters. */
     String leadLimit = limit(0, 2);
@@ -85,16 +116,12 @@
      * formats use spaces to separate each digit. */
     String blockLimit = limit(0, digitBlockLimit);
 
-    /* Same as {@link PhoneNumberUtil#VALID_PUNCTUATION} but without space characters. */
-    String nonSpacePunctuationChars = removeSpace(PhoneNumberUtil.VALID_PUNCTUATION);
-    /* A punctuation sequence without white space. */
-    String nonSpacePunctuation = "[" + nonSpacePunctuationChars + "]" + punctuationLimit;
     /* A punctuation sequence allowing white space. */
     String punctuation = "[" + PhoneNumberUtil.VALID_PUNCTUATION + "]" + punctuationLimit;
     /* A digits block without punctuation. */
     String digitSequence = "\\p{Nd}" + limit(1, digitBlockLimit);
     /* Punctuation that may be at the start of a phone number - brackets and plus signs. */
-    String leadClass = "[(\\[" + PhoneNumberUtil.PLUS_CHARS + "]";
+    String leadClass = "[" + openingParens + PhoneNumberUtil.PLUS_CHARS + "]";
 
     /* Phone number pattern allowing optional punctuation. */
     PATTERN = Pattern.compile(
@@ -102,12 +129,6 @@
         digitSequence + "(?:" + punctuation + digitSequence + ")" + blockLimit +
         "(?:" + PhoneNumberUtil.KNOWN_EXTN_PATTERNS + ")?",
         PhoneNumberUtil.REGEX_FLAGS);
-
-    /* Phone number pattern with no whitespace allowed. */
-    INNER = Pattern.compile(
-        leadClass + leadLimit +
-        digitSequence + "(?:" + nonSpacePunctuation + digitSequence + ")" + blockLimit,
-        PhoneNumberUtil.REGEX_FLAGS);
   }
 
   /** Returns a regular expression quantifier with an upper and lower limit. */
@@ -118,23 +139,6 @@
     return "{" + lower + "," + upper + "}";
   }
 
-  /**
-   * Returns a copy of {@code characters} with any {@linkplain Character#isSpaceChar space}
-   * characters removed.
-   */
-  private static String removeSpace(String characters) {
-    StringBuilder builder = new StringBuilder(characters.length());
-    int i = 0;
-    while (i < characters.length()) {
-      int codePoint = characters.codePointAt(i);
-      if (!Character.isSpaceChar(codePoint)) {
-        builder.appendCodePoint(codePoint);
-      }
-      i += Character.charCount(codePoint);
-    }
-    return builder.toString();
-  }
-
   /** The potential states of a PhoneNumberMatcher. */
   private enum State {
     NOT_READY, READY, DONE
@@ -268,8 +272,8 @@
    * @return  the match found, null if none can be found
    */
   private PhoneNumberMatch extractMatch(CharSequence candidate, int offset) {
-    // Skip a match that is more likely a publication page reference.
-    if (PUB_PAGES.matcher(candidate).find()) {
+    // Skip a match that is more likely a publication page reference or a date.
+    if (PUB_PAGES.matcher(candidate).find() || SLASH_SEPARATED_DATES.matcher(candidate).find()) {
       return null;
     }
 
@@ -280,28 +284,52 @@
       return match;
     }
 
-    // If that failed, try to find an inner match without white space.
+    // If that failed, try to find an "inner match" - there might be a phone number within this
+    // candidate.
     return extractInnerMatch(rawString, offset);
   }
 
   /**
-   * Attempts to extract a match from {@code candidate} using the {@link #INNER} pattern.
+   * Attempts to extract a match from {@code candidate} if the whole candidate does not qualify as a
+   * match.
    *
    * @param candidate  the candidate text that might contain a phone number
-   * @param offset  the offset of {@code candidate} within {@link #text}
+   * @param offset  the current offset of {@code candidate} within {@link #text}
    * @return  the match found, null if none can be found
    */
   private PhoneNumberMatch extractInnerMatch(String candidate, int offset) {
-    int index = 0;
-    Matcher matcher = INNER.matcher(candidate);
-    while ((maxTries > 0) && matcher.find(index)) {
-      String innerCandidate = candidate.substring(matcher.start(), matcher.end());
-      PhoneNumberMatch match = parseAndVerify(innerCandidate, offset + matcher.start());
+    // Try removing either the first or last "group" in the number and see if this gives a result.
+    // We consider white space to be a possible indications of the start or end of the phone number.
+    Matcher groupMatcher = GROUP_SEPARATOR.matcher(candidate);
+
+    if (groupMatcher.find()) {
+      int groupStartIndex = groupMatcher.end();
+      // Remove the first group.
+      CharSequence withoutFirstGroup = candidate.substring(groupStartIndex);
+      withoutFirstGroup = trimAfterFirstMatch(PhoneNumberUtil.UNWANTED_END_CHAR_PATTERN,
+                                              withoutFirstGroup);
+      PhoneNumberMatch match = parseAndVerify(withoutFirstGroup.toString(),
+                                              offset + groupStartIndex);
       if (match != null) {
         return match;
       }
       maxTries--;
-      index = matcher.end();
+
+      if (maxTries > 0) {
+        int lastGroupStart = groupStartIndex;
+        while (groupMatcher.find()) {
+          // Find the last group.
+          lastGroupStart = groupMatcher.start();
+        }
+        CharSequence withoutLastGroup = candidate.substring(0, lastGroupStart);
+        withoutLastGroup = trimAfterFirstMatch(PhoneNumberUtil.UNWANTED_END_CHAR_PATTERN,
+                                               withoutLastGroup);
+        match = parseAndVerify(withoutLastGroup.toString(), offset);
+        if (match != null) {
+          return match;
+        }
+        maxTries--;
+      }
     }
     return null;
   }
@@ -317,6 +345,11 @@
    */
   private PhoneNumberMatch parseAndVerify(String candidate, int offset) {
     try {
+      // Check the candidate doesn't contain any formatting which would indicate that it really
+      // isn't a phone number.
+      if (!MATCHING_BRACKETS.matcher(candidate).matches()) {
+        return null;
+      }
       PhoneNumber number = util.parse(candidate, preferredRegion);
       if (leniency.verify(number, util)) {
         return new PhoneNumberMatch(offset, candidate, number);
diff --git a/java/src/com/google/i18n/phonenumbers/PhoneNumberOfflineGeocoder.java b/java/src/com/google/i18n/phonenumbers/PhoneNumberOfflineGeocoder.java
new file mode 100644
index 0000000..c47afe7
--- /dev/null
+++ b/java/src/com/google/i18n/phonenumbers/PhoneNumberOfflineGeocoder.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2011 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.i18n.phonenumbers;
+
+import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
+
+import java.util.Locale;
+
+/**
+ * An offline geocoder which provides geographical information related to a phone number.
+ *
+ * @author Shaopeng Jia
+ */
+public class PhoneNumberOfflineGeocoder {
+  private static PhoneNumberOfflineGeocoder instance = null;
+  private PhoneNumberUtil phoneUtil;
+
+  /**
+   * For testing purposes, we allow the phone number util variable to be injected.
+   */
+  PhoneNumberOfflineGeocoder(PhoneNumberUtil phoneUtil) {
+    this.phoneUtil = phoneUtil;
+  }
+
+  /**
+   * Gets a {@link PhoneNumberOfflineGeocoder} instance to carry out international phone number
+   * geocoding.
+   *
+   * <p> The {@link PhoneNumberOfflineGeocoder} is implemented as a singleton. Therefore, calling
+   * this method multiple times will only result in one instance being created.
+   *
+   * @return  a {@link PhoneNumberOfflineGeocoder} instance
+   */
+  public static synchronized PhoneNumberOfflineGeocoder getInstance() {
+    if (instance == null) {
+      instance = new PhoneNumberOfflineGeocoder(PhoneNumberUtil.getInstance());
+    }
+    return instance;
+  }
+
+  /**
+   * Returns the customary display name in the given language for the given territory the phone
+   * number is from.
+   */
+  private String getCountryNameForNumber(PhoneNumber number, Locale language) {
+    String regionCode = phoneUtil.getRegionCodeForNumber(number);
+    return (regionCode == null || regionCode.equals("ZZ"))
+        ? "" : new Locale("", regionCode).getDisplayCountry(language);
+  }
+
+  /**
+   * Returns a text description in the given language for the given phone number. The
+   * description might consist of the name of the country where the phone number is from and/or the
+   * name of the geographical area the phone number is from.
+   *
+   * @param number  the phone number for which we want to get a text description
+   * @param language  the language in which the description should be written
+   * @return  a text description in the given language for the given phone number
+   */
+  public String getDescriptionForNumber(PhoneNumber number, Locale language) {
+    // TODO: Implement logic to figure out fine-grained geographical information based
+    // on area code here.
+    return getCountryNameForNumber(number, language);
+  }
+}
diff --git a/java/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java b/java/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
index a0f1857..b6fd79e 100644
--- a/java/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
+++ b/java/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
@@ -44,6 +44,9 @@
  * Utility for international phone numbers. Functionality includes formatting, parsing and
  * validation.
  *
+ * <p>If you use this library, and want to be notified about important changes, please sign up to
+ * our <a href="http://groups.google.com/group/libphonenumber-discuss/about">mailing list</a>.
+ *
  * @author Shaopeng Jia
  * @author Lara Rennie
  */
@@ -53,36 +56,38 @@
   // The minimum and maximum length of the national significant number.
   private static final int MIN_LENGTH_FOR_NSN = 3;
   static final int MAX_LENGTH_FOR_NSN = 15;
-  // The maximum length of the country code.
+  // The maximum length of the country calling code.
   static final int MAX_LENGTH_COUNTRY_CODE = 3;
   static final String META_DATA_FILE_PREFIX =
       "/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto";
   private String currentFilePrefix = META_DATA_FILE_PREFIX;
   private static final Logger LOGGER = Logger.getLogger(PhoneNumberUtil.class.getName());
 
-  // A mapping from a country code to the region codes which denote the country/region
-  // represented by that country code. In the case of multiple countries sharing a calling code,
-  // such as the NANPA countries, the one indicated with "isMainCountryForCode" in the metadata
-  // should be first.
-  private Map<Integer, List<String>> countryCodeToRegionCodeMap = null;
+  // A mapping from a country calling code to the region codes which denote the region represented
+  // by that country calling code. In the case of multiple regions sharing a calling code, such as
+  // the NANPA regions, the one indicated with "isMainCountryForCode" in the metadata should be
+  // first.
+  private Map<Integer, List<String>> countryCallingCodeToRegionCodeMap = null;
 
-  // The set of countries the library supports.
+  // The set of regions the library supports.
   // There are roughly 220 of them and we set the initial capacity of the HashSet to 300 to offer a
   // load factor of roughly 0.75.
-  private final Set<String> supportedCountries = new HashSet<String>(300);
+  private final Set<String> supportedRegions = new HashSet<String>(300);
 
   // Region-code for the unknown region.
   private static final String UNKNOWN_REGION = "ZZ";
 
-  // The set of countries that share country code 1.
-  // There are roughly 26 countries of them and we set the initial capacity of the HashSet to 35
-  // to offer a load factor of roughly 0.75.
-  private final Set<String> nanpaCountries = new HashSet<String>(35);
+  // The set of regions that share country code 1.
+  // There are roughly 26 regions and we set the initial capacity of the HashSet to 35 to offer a
+  // load factor of roughly 0.75.
+  private final Set<String> nanpaRegions = new HashSet<String>(35);
   private static final int NANPA_COUNTRY_CODE = 1;
 
   // The PLUS_SIGN signifies the international prefix.
   static final char PLUS_SIGN = '+';
 
+  private static final String RFC3966_EXTN_PREFIX = ";ext=";
+
   // These mappings map a character (key) to a specific digit that should replace it for
   // normalization purposes. Non-European digits that may be used in phone numbers are mapped to a
   // European equivalent.
@@ -94,45 +99,54 @@
   // For performance reasons, amalgamate both into one map.
   private static final Map<Character, Character> ALL_NORMALIZATION_MAPPINGS;
 
+  // Separate map of all symbols that we wish to retain when formatting alpha numbers. This
+  // includes digits, ASCII letters and number grouping symbols such as "-" and " ".
+  private static final Map<Character, Character> ALL_PLUS_NUMBER_GROUPING_SYMBOLS;
+
   static {
+    // Simple ASCII digits map used to populate DIGIT_MAPPINGS and
+    // ALL_PLUS_NUMBER_GROUPING_SYMBOLS.
+    HashMap<Character, Character> asciiDigitMappings = new HashMap<Character, Character>();
+    asciiDigitMappings.put('0', '0');
+    asciiDigitMappings.put('1', '1');
+    asciiDigitMappings.put('2', '2');
+    asciiDigitMappings.put('3', '3');
+    asciiDigitMappings.put('4', '4');
+    asciiDigitMappings.put('5', '5');
+    asciiDigitMappings.put('6', '6');
+    asciiDigitMappings.put('7', '7');
+    asciiDigitMappings.put('8', '8');
+    asciiDigitMappings.put('9', '9');
+
     HashMap<Character, Character> digitMap = new HashMap<Character, Character>(50);
-    digitMap.put('0', '0');
+    digitMap.putAll(asciiDigitMappings);
     digitMap.put('\uFF10', '0');  // Fullwidth digit 0
     digitMap.put('\u0660', '0');  // Arabic-indic digit 0
     digitMap.put('\u06F0', '0');  // Eastern-Arabic digit 0
-    digitMap.put('1', '1');
     digitMap.put('\uFF11', '1');  // Fullwidth digit 1
     digitMap.put('\u0661', '1');  // Arabic-indic digit 1
     digitMap.put('\u06F1', '1');  // Eastern-Arabic digit 1
-    digitMap.put('2', '2');
     digitMap.put('\uFF12', '2');  // Fullwidth digit 2
     digitMap.put('\u0662', '2');  // Arabic-indic digit 2
     digitMap.put('\u06F2', '2');  // Eastern-Arabic digit 2
-    digitMap.put('3', '3');
     digitMap.put('\uFF13', '3');  // Fullwidth digit 3
     digitMap.put('\u0663', '3');  // Arabic-indic digit 3
     digitMap.put('\u06F3', '3');  // Eastern-Arabic digit 3
-    digitMap.put('4', '4');
     digitMap.put('\uFF14', '4');  // Fullwidth digit 4
     digitMap.put('\u0664', '4');  // Arabic-indic digit 4
     digitMap.put('\u06F4', '4');  // Eastern-Arabic digit 4
-    digitMap.put('5', '5');
     digitMap.put('\uFF15', '5');  // Fullwidth digit 5
     digitMap.put('\u0665', '5');  // Arabic-indic digit 5
     digitMap.put('\u06F5', '5');  // Eastern-Arabic digit 5
-    digitMap.put('6', '6');
     digitMap.put('\uFF16', '6');  // Fullwidth digit 6
     digitMap.put('\u0666', '6');  // Arabic-indic digit 6
     digitMap.put('\u06F6', '6');  // Eastern-Arabic digit 6
-    digitMap.put('7', '7');
     digitMap.put('\uFF17', '7');  // Fullwidth digit 7
     digitMap.put('\u0667', '7');  // Arabic-indic digit 7
     digitMap.put('\u06F7', '7');  // Eastern-Arabic digit 7
-    digitMap.put('8', '8');
     digitMap.put('\uFF18', '8');  // Fullwidth digit 8
     digitMap.put('\u0668', '8');  // Arabic-indic digit 8
     digitMap.put('\u06F8', '8');  // Eastern-Arabic digit 8
-    digitMap.put('9', '9');
     digitMap.put('\uFF19', '9');  // Fullwidth digit 9
     digitMap.put('\u0669', '9');  // Arabic-indic digit 9
     digitMap.put('\u06F9', '9');  // Eastern-Arabic digit 9
@@ -171,31 +185,38 @@
     combinedMap.putAll(alphaMap);
     combinedMap.putAll(digitMap);
     ALL_NORMALIZATION_MAPPINGS = Collections.unmodifiableMap(combinedMap);
+
+    HashMap<Character, Character> allPlusNumberGroupings = new HashMap<Character, Character>();
+    // Put (lower letter -> upper letter) and (upper letter -> upper letter) mappings.
+    for (char c : ALPHA_MAPPINGS.keySet()) {
+      allPlusNumberGroupings.put(Character.toLowerCase(c), c);
+      allPlusNumberGroupings.put(c, c);
+    }
+    allPlusNumberGroupings.putAll(asciiDigitMappings);
+    // Put grouping symbols.
+    allPlusNumberGroupings.put('-', '-');
+    allPlusNumberGroupings.put('\uFF0D', '-');
+    allPlusNumberGroupings.put('\u2010', '-');
+    allPlusNumberGroupings.put('\u2011', '-');
+    allPlusNumberGroupings.put('\u2012', '-');
+    allPlusNumberGroupings.put('\u2013', '-');
+    allPlusNumberGroupings.put('\u2014', '-');
+    allPlusNumberGroupings.put('\u2015', '-');
+    allPlusNumberGroupings.put('\u2212', '-');
+    allPlusNumberGroupings.put('/', '/');
+    allPlusNumberGroupings.put('\uFF0F', '/');
+    allPlusNumberGroupings.put(' ', ' ');
+    allPlusNumberGroupings.put('\u3000', ' ');
+    allPlusNumberGroupings.put('\u2060', ' ');
+    allPlusNumberGroupings.put('.', '.');
+    allPlusNumberGroupings.put('\uFF0E', '.');
+    ALL_PLUS_NUMBER_GROUPING_SYMBOLS = Collections.unmodifiableMap(allPlusNumberGroupings);
   }
 
-  // A list of all country codes where national significant numbers (excluding any national prefix)
-  // exist that start with a leading zero.
-  private static final Set<Integer> LEADING_ZERO_COUNTRIES;
-  static {
-    HashSet<Integer> aSet = new HashSet<Integer>(10);
-    aSet.add(39);  // Italy
-    aSet.add(47);  // Norway
-    aSet.add(225);  // Cote d'Ivoire
-    aSet.add(227);  // Niger
-    aSet.add(228);  // Togo
-    aSet.add(241);  // Gabon
-    aSet.add(242);  // Congo (Rep. of the)
-    aSet.add(268);  // Swaziland
-    aSet.add(378);  // San Marino
-    aSet.add(379);  // Vatican City
-    aSet.add(501);  // Belize
-    LEADING_ZERO_COUNTRIES = Collections.unmodifiableSet(aSet);
-  }
-
-  // Pattern that makes it easy to distinguish whether a country has a unique international dialing
-  // prefix or not. If a country has a unique international prefix (e.g. 011 in USA), it will be
+  // Pattern that makes it easy to distinguish whether a region has a unique international dialing
+  // prefix or not. If a region has a unique international prefix (e.g. 011 in USA), it will be
   // represented as a string that contains a sequence of ASCII digits. If there are multiple
-  // available international prefixes in a country, they will be represented as a regex string that
+  // available international prefixes in a region, they will be represented as a regex string that
   // always contains character(s) other than ASCII digits.
   // Note this regex also includes tilde, which signals waiting for the tone.
   private static final Pattern UNIQUE_INTERNATIONAL_PREFIX =
@@ -218,6 +239,7 @@
       Arrays.toString(ALPHA_MAPPINGS.keySet().toArray()).toLowerCase().replaceAll("[, \\[\\]]", "");
   static final String PLUS_CHARS = "+\uFF0B";
   private static final Pattern PLUS_CHARS_PATTERN = Pattern.compile("[" + PLUS_CHARS + "]+");
+  private static final Pattern SEPARATOR_PATTERN = Pattern.compile("[" + VALID_PUNCTUATION + "]+");
   private static final Pattern CAPTURING_DIGIT_PATTERN =
       Pattern.compile("([" + VALID_DIGITS + "])");
 
@@ -242,7 +264,7 @@
   // are not alpha or numerical characters. The hash character is retained here, as it may signify
   // the previous block was an extension.
   private static final String UNWANTED_END_CHARS = "[[\\P{N}&&\\P{L}]&&[^#]]+$";
-  private static final Pattern UNWANTED_END_CHAR_PATTERN = Pattern.compile(UNWANTED_END_CHARS);
+  static final Pattern UNWANTED_END_CHAR_PATTERN = Pattern.compile(UNWANTED_END_CHARS);
 
   // We use this pattern to check if the phone number has at least three letters in it - if so, then
   // we treat it as a number where some phone-number digits are represented by letters.
@@ -264,27 +286,30 @@
   // Default extension prefix to use when formatting. This will be put in front of any extension
   // component of the number, after the main national number is formatted. For example, if you wish
   // the default extension formatting to be " extn: 3456", then you should specify " extn: " here
-  // as the default extension prefix. This can be overridden by country-specific preferences.
+  // as the default extension prefix. This can be overridden by region-specific preferences.
   private static final String DEFAULT_EXTN_PREFIX = " ext. ";
 
   // Regexp of all possible ways to write extensions, for use when parsing. This will be run as a
-  // case-insensitive regexp match. Wide character versions are also provided after each ascii
-  // version. There are two regular expressions here: the more generic one starts with optional
-  // white space and ends with an optional full stop (.), followed by zero or more spaces/tabs and
-  // then the numbers themselves. The other one covers the special case of American numbers where
-  // the extension is written with a hash at the end, such as "- 503#".
+  // case-insensitive regexp match. Wide character versions are also provided after each ASCII
+  // version. There are three regular expressions here. The first covers RFC 3966 format, where the
+  // extension is added using ";ext=". The second more generic one starts with optional white space
+  // and ends with an optional full stop (.), followed by zero or more spaces/tabs and then the
+  // numbers themselves. The other one covers the special case of American numbers where the
+  // extension is written with a hash at the end, such as "- 503#".
   // Note that the only capturing groups should be around the digits that you want to capture as
   // part of the extension, or else parsing will fail!
   // Canonical-equivalence doesn't seem to be an option with Android java, so we allow two options
   // for representing the accented o - the character itself, and one in the unicode decomposed form
   // with the combining acute accent.
-  static final String KNOWN_EXTN_PATTERNS = "[ \u00A0\\t,]*" +
-      "(?:ext(?:ensi(?:o\u0301?|\u00F3))?n?|" +
+  private static final String CAPTURING_EXTN_DIGITS = "([" + VALID_DIGITS + "]{1,7})";
+  static final String KNOWN_EXTN_PATTERNS =
+      RFC3966_EXTN_PREFIX + CAPTURING_EXTN_DIGITS + "|" +
+      "[ \u00A0\\t,]*(?:ext(?:ensi(?:o\u0301?|\u00F3))?n?|" +
       "\uFF45\uFF58\uFF54\uFF4E?|[,x\uFF58#\uFF03~\uFF5E]|int|anexo|\uFF49\uFF4E\uFF54)" +
-      "[:\\.\uFF0E]?[ \u00A0\\t,-]*([" + VALID_DIGITS + "]{1,7})#?|[- ]+([" + VALID_DIGITS +
-      "]{1,5})#";
+      "[:\\.\uFF0E]?[ \u00A0\\t,-]*" + CAPTURING_EXTN_DIGITS + "#?|" +
+      "[- ]+([" + VALID_DIGITS + "]{1,5})#";
 
-  // Regexp of all known extension prefixes used by different countries followed by 1 or more valid
+  // Regexp of all known extension prefixes used by different regions followed by 1 or more valid
   // digits, for use when parsing.
   private static final Pattern EXTN_PATTERN =
       Pattern.compile("(?:" + KNOWN_EXTN_PATTERNS + ")$", REGEX_FLAGS);
@@ -295,7 +320,12 @@
       Pattern.compile(VALID_PHONE_NUMBER + "(?:" + KNOWN_EXTN_PATTERNS + ")?", REGEX_FLAGS);
 
   private static final Pattern NON_DIGITS_PATTERN = Pattern.compile("(\\D+)");
-  private static final Pattern FIRST_GROUP_PATTERN = Pattern.compile("(\\$1)");
+
+  // The FIRST_GROUP_PATTERN was originally set to $1 but there are some countries for which the
+  // first group is not used in the national pattern (e.g. Argentina) so the $1 group does not match
+  // correctly.  Therefore, we use \d, so that the first group actually used in the pattern will be
+  // matched.
+  private static final Pattern FIRST_GROUP_PATTERN = Pattern.compile("(\\$\\d)");
   private static final Pattern NP_PATTERN = Pattern.compile("\\$NP");
   private static final Pattern FG_PATTERN = Pattern.compile("\\$FG");
   private static final Pattern CC_PATTERN = Pattern.compile("\\$CC");
@@ -303,10 +333,9 @@
   private static PhoneNumberUtil instance = null;
 
   // A mapping from a region code to the PhoneMetadata for that region.
-  private Map<String, PhoneMetadata> countryToMetadataMap =
-      new HashMap<String, PhoneMetadata>();
+  private Map<String, PhoneMetadata> regionToMetadataMap = new HashMap<String, PhoneMetadata>();
 
-  // A cache for frequently used country-specific regular expressions.
+  // A cache for frequently used region-specific regular expressions.
   // As most people use phone numbers primarily from one to two countries, and there are roughly 60
   // regular expressions needed, the initial capacity of 100 offers a rough load factor of 0.75.
   private RegexCache regexCache = new RegexCache(100);
@@ -316,14 +345,17 @@
    * E. 123. For example, the number of the Google Zurich office will be written as
    * "+41 44 668 1800" in INTERNATIONAL format, and as "044 668 1800" in NATIONAL format.
    * E164 format is as per INTERNATIONAL format but with no formatting applied, e.g. +41446681800.
+   * RFC3966 is as per INTERNATIONAL format, but with all spaces and other separating symbols
+   * replaced with a hyphen, and with any phone number extension appended with ";ext=".
    *
    * Note: If you are considering storing the number in a neutral format, you are highly advised to
-   * use the phonenumber.proto.
+   * use the PhoneNumber class.
    */
   public enum PhoneNumberFormat {
     E164,
     INTERNATIONAL,
-    NATIONAL
+    NATIONAL,
+    RFC3966
   }
 
   /**
@@ -332,7 +364,7 @@
   public enum PhoneNumberType {
     FIXED_LINE,
     MOBILE,
-    // In some countries (e.g. the USA), it is impossible to distinguish between fixed-line and
+    // In some regions (e.g. the USA), it is impossible to distinguish between fixed-line and
     // mobile numbers by looking at the phone number itself.
     FIXED_LINE_OR_MOBILE,
     // Freephone lines
@@ -353,7 +385,7 @@
     // specific offices, but allow one number to be used for a company.
     UAN,
     // A phone number is of type UNKNOWN when it does not fit any of the known patterns for a
-    // specific country.
+    // specific region.
     UNKNOWN
   }
 
@@ -416,10 +448,10 @@
 
   private void init(String filePrefix) {
     currentFilePrefix = filePrefix;
-    for (List<String> regionCodes : countryCodeToRegionCodeMap.values()) {
-      supportedCountries.addAll(regionCodes);
+    for (List<String> regionCodes : countryCallingCodeToRegionCodeMap.values()) {
+      supportedRegions.addAll(regionCodes);
     }
-    nanpaCountries.addAll(countryCodeToRegionCodeMap.get(NANPA_COUNTRY_CODE));
+    nanpaRegions.addAll(countryCallingCodeToRegionCodeMap.get(NANPA_COUNTRY_CODE));
   }
 
   private void loadMetadataForRegionFromFile(String filePrefix, String regionCode) {
@@ -431,7 +463,7 @@
       PhoneMetadataCollection metadataCollection = new PhoneMetadataCollection();
       metadataCollection.readExternal(in);
       for (PhoneMetadata metadata : metadataCollection.getMetadataList()) {
-        countryToMetadataMap.put(regionCode, metadata);
+        regionToMetadataMap.put(regionCode, metadata);
       }
     } catch (IOException e) {
       LOGGER.log(Level.WARNING, e.toString());
@@ -440,13 +472,13 @@
 
   /**
    * Attempts to extract a possible number from the string passed in. This currently strips all
-   * leading characters that could not be used to start a phone number. Characters that can be used
-   * to start a phone number are defined in the VALID_START_CHAR_PATTERN. If none of these
-   * characters are found in the number passed in, an empty string is returned. This function also
-   * attempts to strip off any alternative extensions or endings if two or more are present, such as
-   * in the case of: (530) 583-6985 x302/x2303. The second extension here makes this actually two
-   * phone numbers, (530) 583-6985 x302 and (530) 583-6985 x2303. We remove the second extension so
-   * that the first number is parsed correctly.
+   * leading characters that cannot be used to start a phone number. Characters that can be used to
+   * start a phone number are defined in the VALID_START_CHAR_PATTERN. If none of these characters
+   * are found in the number passed in, an empty string is returned. This function also attempts to
+   * strip off any alternative extensions or endings if two or more are present, such as in the case
+   * of: (530) 583-6985 x302/x2303. The second extension here makes this actually two phone numbers,
+   * (530) 583-6985 x302 and (530) 583-6985 x2303. We remove the second extension so that the first
+   * number is parsed correctly.
    *
    * @param number  the string that might contain a phone number
    * @return        the number, stripped of any non-phone-number prefix (such as "Tel:") or an empty
@@ -461,6 +493,7 @@
       Matcher trailingCharsMatcher = UNWANTED_END_CHAR_PATTERN.matcher(number);
       if (trailingCharsMatcher.find()) {
         number = number.substring(0, trailingCharsMatcher.start());
+        LOGGER.log(Level.FINER, "Stripped trailing characters: " + number);
       }
       // Check for extra numbers at the end.
       Matcher secondNumber = SECOND_NUMBER_START_PATTERN.matcher(number);
@@ -516,12 +549,12 @@
 
   /**
    * Normalizes a string of characters representing a phone number. This is a wrapper for
-   * normalize(String number) but does in-place normalization of the StringBuffer provided.
+   * normalize(String number) but does in-place normalization of the StringBuilder provided.
    *
-   * @param number  a StringBuffer of characters representing a phone number that will be normalized
-   *     in place
+   * @param number  a StringBuilder of characters representing a phone number that will be
+   *     normalized in place
    */
-  static void normalize(StringBuffer number) {
+  static void normalize(StringBuilder number) {
     String normalizedNumber = normalize(number.toString());
     number.replace(0, number.length(), normalizedNumber);
   }
@@ -547,15 +580,16 @@
   }
 
   /**
-   * Gets the length of the geographical area code from the national_number field of the PhoneNumber
-   * object passed in, so that clients could use it to split a national significant number into
-   * geographical area code and subscriber number. It works in such a way that the resultant
-   * subscriber number should be diallable, at least on some devices. An example of how this could
-   * be used:
+   * Gets the length of the geographical area code in the {@code nationalNumber_} field of the
+   * PhoneNumber object passed in, so that clients could use it to split a national significant
+   * number into geographical area code and subscriber number. It works in such a way that the
+   * resultant subscriber number should be diallable, at least on some devices. An example of how
+   * this could be used:
    *
+   * <pre>
    * PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
    * PhoneNumber number = phoneUtil.parse("16502530000", "US");
-   * String nationalSignificantNumber = PhoneNumberUtil.getNationalSignificantNumber(number);
+   * String nationalSignificantNumber = phoneUtil.getNationalSignificantNumber(number);
    * String areaCode;
    * String subscriberNumber;
    *
@@ -567,10 +601,10 @@
    *   areaCode = "";
    *   subscriberNumber = nationalSignificantNumber;
    * }
+   * </pre>
    *
    * N.B.: area code is a very ambiguous concept, so the I18N team generally recommends against
-   * using it for most purposes, but recommends using the more general national_number instead. Read
-   * the following carefully before deciding to use this method:
+   * using it for most purposes. Read the following carefully before deciding to use this method:
    *
    *  - geographical area codes change over time, and this method honors those changes; therefore,
    *    it doesn't guarantee the stability of the result it produces.
@@ -607,12 +641,13 @@
    * Gets the length of the national destination code (NDC) from the PhoneNumber object passed in,
    * so that clients could use it to split a national significant number into NDC and subscriber
    * number. The NDC of a phone number is normally the first group of digit(s) right after the
-   * country code when the number is formatted in the international format, if there is a subscriber
-   * number part that follows. An example of how this could be used:
+   * country calling code when the number is formatted in the international format, if there is a
+   * subscriber number part that follows. An example of how this could be used:
    *
+   * <pre>
    * PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
    * PhoneNumber number = phoneUtil.parse("18002530000", "US");
-   * String nationalSignificantNumber = PhoneNumberUtil.getNationalSignificantNumber(number);
+   * String nationalSignificantNumber = phoneUtil.getNationalSignificantNumber(number);
    * String nationalDestinationCode;
    * String subscriberNumber;
    *
@@ -625,9 +660,10 @@
    *   nationalDestinationCode = "";
    *   subscriberNumber = nationalSignificantNumber;
    * }
+   * </pre>
    *
    * Refer to the unittests to see the difference between this function and
-   * getLengthOfGeographicalAreaCode().
+   * {@link #getLengthOfGeographicalAreaCode()}.
    *
    * @param number  the PhoneNumber object for which clients want to know the length of the NDC.
    * @return  the length of NDC of the PhoneNumber object passed in.
@@ -648,8 +684,8 @@
                                               PhoneNumberUtil.PhoneNumberFormat.INTERNATIONAL);
     String[] numberGroups = NON_DIGITS_PATTERN.split(nationalSignificantNumber);
     // The pattern will start with "+COUNTRY_CODE " so the first group will always be the empty
-    // string (before the + symbol) and the second group will be the country code. The third group
-    // will be area code if it is not the last group.
+    // string (before the + symbol) and the second group will be the country calling code. The third
+    // group will be area code if it is not the last group.
     if (numberGroups.length <= 3) {
       return 0;
     }
@@ -683,7 +719,7 @@
   private static String normalizeHelper(String number,
                                         Map<Character, Character> normalizationReplacements,
                                         boolean removeNonMatches) {
-    StringBuffer normalizedNumber = new StringBuffer(number.length());
+    StringBuilder normalizedNumber = new StringBuilder(number.length());
     char[] numberAsCharArray = number.toCharArray();
     for (char character : numberAsCharArray) {
       Character newDigit = normalizationReplacements.get(Character.toUpperCase(character));
@@ -699,10 +735,10 @@
 
   static synchronized PhoneNumberUtil getInstance(
       String baseFileLocation,
-      Map<Integer, List<String>> countryCodeToRegionCodeMap) {
+      Map<Integer, List<String>> countryCallingCodeToRegionCodeMap) {
     if (instance == null) {
       instance = new PhoneNumberUtil();
-      instance.countryCodeToRegionCodeMap = countryCodeToRegionCodeMap;
+      instance.countryCallingCodeToRegionCodeMap = countryCallingCodeToRegionCodeMap;
       instance.init(baseFileLocation);
     }
     return instance;
@@ -716,20 +752,19 @@
   }
 
   /**
-   * Convenience method to enable tests to get a list of what countries the library has metadata
-   * for.
+   * Convenience method to enable tests to get a list of what regions the library has metadata for.
    */
-  public Set<String> getSupportedCountries() {
-    return supportedCountries;
+  public Set<String> getSupportedRegions() {
+    return supportedRegions;
   }
 
   /**
-   * Gets a PhoneNumberUtil instance to carry out international phone number formatting, parsing,
-   * or validation. The instance is loaded with phone number metadata for a number of most commonly
-   * used countries/regions.
+   * Gets a {@link PhoneNumberUtil} instance to carry out international phone number formatting,
+   * parsing, or validation. The instance is loaded with phone number metadata for a number of most
+   * commonly used regions.
    *
-   * The PhoneNumberUtil is implemented as a singleton. Therefore, calling getInstance multiple
-   * times will only result in one instance being created.
+   * <p>The {@link PhoneNumberUtil} is implemented as a singleton. Therefore, calling getInstance
+   * multiple times will only result in one instance being created.
    *
    * @return a PhoneNumberUtil instance
    */
@@ -745,7 +780,23 @@
    * Helper function to check region code is not unknown or null.
    */
   private boolean isValidRegionCode(String regionCode) {
-    return regionCode != null && supportedCountries.contains(regionCode.toUpperCase());
+    return regionCode != null && supportedRegions.contains(regionCode.toUpperCase());
+  }
+
+  /**
+   * Helper function to check region code is not unknown or null and log an error message. The
+   * {@code countryCallingCode} and {@code number} supplied is used only for the resultant log
+   * message.
+   */
+  private boolean hasValidRegionCode(String regionCode,
+                                     int countryCallingCode, String number) {
+    if (!isValidRegionCode(regionCode)) {
+      LOGGER.log(Level.WARNING,
+                 "Number " + number + " has invalid or missing country calling code ("
+                 + countryCallingCode + ")");
+      return false;
+    }
+    return true;
   }
 
   /**
@@ -754,24 +805,25 @@
    * format in either 'national' or 'international' format depending on what the client asks for, we
    * do not currently support a more abbreviated format, such as for users in the same "area" who
    * could potentially dial the number without area code. Note that if the phone number has a
-   * country code of 0 or an otherwise invalid country code, we cannot work out which formatting
-   * rules to apply so we return the national significant number with no formatting applied.
+   * country calling code of 0 or an otherwise invalid country calling code, we cannot work out
+   * which formatting rules to apply so we return the national significant number with no formatting
+   * applied.
    *
    * @param number         the phone number to be formatted
    * @param numberFormat   the format the phone number should be formatted into
    * @return  the formatted phone number
    */
   public String format(PhoneNumber number, PhoneNumberFormat numberFormat) {
-    StringBuffer formattedNumber = new StringBuffer(20);
+    StringBuilder formattedNumber = new StringBuilder(20);
     format(number, numberFormat, formattedNumber);
     return formattedNumber.toString();
   }
 
-  // Same as format(PhoneNumber, PhoneNumberFormat), but accepts mutable StringBuffer as parameters
+  // Same as format(PhoneNumber, PhoneNumberFormat), but accepts mutable StringBuilder as parameters
   // to decrease object creation when invoked many times.
   public void format(PhoneNumber number, PhoneNumberFormat numberFormat,
-                     StringBuffer formattedNumber) {
-    // Clear the StringBuffer first.
+                     StringBuilder formattedNumber) {
+    // Clear the StringBuilder first.
     formattedNumber.setLength(0);
     int countryCode = number.getCountryCode();
     String nationalSignificantNumber = getNationalSignificantNumber(number);
@@ -782,9 +834,9 @@
       formatNumberByFormat(countryCode, PhoneNumberFormat.E164, formattedNumber);
       return;
     }
-    // Note getRegionCodeForCountryCode() is used because formatting information for countries which
-    // share a country code is contained by only one country for performance reasons. For example,
-    // for NANPA countries it will be contained in the metadata for US.
+    // Note getRegionCodeForCountryCode() is used because formatting information for regions which
+    // share a country calling code is contained by only one region for performance reasons. For
+    // example, for NANPA regions it will be contained in the metadata for US.
     String regionCode = getRegionCodeForCountryCode(countryCode);
     if (!isValidRegionCode(regionCode)) {
       formattedNumber.append(nationalSignificantNumber);
@@ -793,15 +845,15 @@
 
     formattedNumber.append(formatNationalNumber(nationalSignificantNumber,
                                                 regionCode, numberFormat));
-    maybeGetFormattedExtension(number, regionCode, formattedNumber);
+    maybeGetFormattedExtension(number, regionCode, numberFormat, formattedNumber);
     formatNumberByFormat(countryCode, numberFormat, formattedNumber);
   }
 
   /**
    * Formats a phone number in the specified format using client-defined formatting rules. Note that
-   * if the phone number has a country code of zero or an otherwise invalid country code, we cannot
-   * work out things like whether there should be a national prefix applied, or how to format
-   * extensions, so we return the national significant number with no formatting applied.
+   * if the phone number has a country calling code of zero or an otherwise invalid country calling
+   * code, we cannot work out things like whether there should be a national prefix applied, or how
+   * to format extensions, so we return the national significant number with no formatting applied.
    *
    * @param number                        the phone number to be formatted
    * @param numberFormat                  the format the phone number should be formatted into
@@ -811,13 +863,13 @@
   public String formatByPattern(PhoneNumber number,
                                 PhoneNumberFormat numberFormat,
                                 List<NumberFormat> userDefinedFormats) {
-    int countryCode = number.getCountryCode();
+    int countryCallingCode = number.getCountryCode();
     String nationalSignificantNumber = getNationalSignificantNumber(number);
-    // Note getRegionCodeForCountryCode() is used because formatting information for countries which
-    // share a country code is contained by only one country for performance reasons. For example,
-    // for NANPA countries it will be contained in the metadata for US.
-    String regionCode = getRegionCodeForCountryCode(countryCode);
-    if (!isValidRegionCode(regionCode)) {
+    // Note getRegionCodeForCountryCode() is used because formatting information for regions which
+    // share a country calling code is contained by only one region for performance reasons. For
+    // example, for NANPA regions it will be contained in the metadata for US.
+    String regionCode = getRegionCodeForCountryCode(countryCallingCode);
+    if (!hasValidRegionCode(regionCode, countryCallingCode, nationalSignificantNumber)) {
       return nationalSignificantNumber;
     }
     List<NumberFormat> userDefinedFormatsCopy =
@@ -849,62 +901,63 @@
       }
     }
 
-    StringBuffer formattedNumber =
-        new StringBuffer(formatAccordingToFormats(nationalSignificantNumber,
-                                                  userDefinedFormatsCopy,
-                                                  numberFormat));
-    maybeGetFormattedExtension(number, regionCode, formattedNumber);
-    formatNumberByFormat(countryCode, numberFormat, formattedNumber);
+    StringBuilder formattedNumber =
+        new StringBuilder(formatAccordingToFormats(nationalSignificantNumber,
+                                                   userDefinedFormatsCopy,
+                                                   numberFormat));
+    maybeGetFormattedExtension(number, regionCode, numberFormat, formattedNumber);
+    formatNumberByFormat(countryCallingCode, numberFormat, formattedNumber);
     return formattedNumber.toString();
   }
 
   /**
    * Formats a phone number in national format for dialing using the carrier as specified in the
-   * carrierCode. The carrierCode will always be used regardless of whether the phone number already
-   * has a preferred domestic carrier code stored. If carrierCode contains an empty string, return
-   * the number in national format without any carrier code.
+   * {@code carrierCode}. The {@code carrierCode} will always be used regardless of whether the
+   * phone number already has a preferred domestic carrier code stored. If {@code carrierCode}
+   * contains an empty string, returns the number in national format without any carrier code.
    *
    * @param number  the phone number to be formatted
    * @param carrierCode  the carrier selection code to be used
    * @return  the formatted phone number in national format for dialing using the carrier as
-   *          specified in the carrierCode
+   *          specified in the {@code carrierCode}
    */
   public String formatNationalNumberWithCarrierCode(PhoneNumber number, String carrierCode) {
-    int countryCode = number.getCountryCode();
+    int countryCallingCode = number.getCountryCode();
     String nationalSignificantNumber = getNationalSignificantNumber(number);
-    // Note getRegionCodeForCountryCode() is used because formatting information for countries which
-    // share a country code is contained by only one country for performance reasons. For example,
-    // for NANPA countries it will be contained in the metadata for US.
-    String regionCode = getRegionCodeForCountryCode(countryCode);
-    if (!isValidRegionCode(regionCode)) {
+    // Note getRegionCodeForCountryCode() is used because formatting information for regions which
+    // share a country calling code is contained by only one region for performance reasons. For
+    // example, for NANPA regions it will be contained in the metadata for US.
+    String regionCode = getRegionCodeForCountryCode(countryCallingCode);
+    if (!hasValidRegionCode(regionCode, countryCallingCode, nationalSignificantNumber)) {
       return nationalSignificantNumber;
     }
 
-    StringBuffer formattedNumber = new StringBuffer(20);
+    StringBuilder formattedNumber = new StringBuilder(20);
     formattedNumber.append(formatNationalNumber(nationalSignificantNumber,
                                                 regionCode,
                                                 PhoneNumberFormat.NATIONAL,
                                                 carrierCode));
-    maybeGetFormattedExtension(number, regionCode, formattedNumber);
-    formatNumberByFormat(countryCode, PhoneNumberFormat.NATIONAL, formattedNumber);
+    maybeGetFormattedExtension(number, regionCode, PhoneNumberFormat.NATIONAL, formattedNumber);
+    formatNumberByFormat(countryCallingCode, PhoneNumberFormat.NATIONAL, formattedNumber);
     return formattedNumber.toString();
   }
 
   /**
    * Formats a phone number in national format for dialing using the carrier as specified in the
-   * preferred_domestic_carrier_code field of the PhoneNumber object passed in. If that is missing,
-   * use the fallbackCarrierCode passed in instead. If there is no preferred_domestic_carrier_code,
-   * and the fallbackCarrierCode contains an empty string, return the number in national format
-   * without any carrier code.
+   * preferredDomesticCarrierCode field of the PhoneNumber object passed in. If that is missing,
+   * use the {@code fallbackCarrierCode} passed in instead. If there is no
+   * {@code preferredDomesticCarrierCode}, and the {@code fallbackCarrierCode} contains an empty
+   * string, return the number in national format without any carrier code.
    *
-   * Use formatNationalNumberWithCarrierCode instead if the carrier code passed in should take
-   * precedence over the number's preferred_domestic_carrier_code when formatting.
+   * <p>Use {@link #formatNationalNumberWithCarrierCode} instead if the carrier code passed in
+   * should take precedence over the number's {@code preferredDomesticCarrierCode} when formatting.
    *
    * @param number  the phone number to be formatted
    * @param fallbackCarrierCode  the carrier selection code to be used, if none is found in the
-   *        phone number itself
+   *     phone number itself
    * @return  the formatted phone number in national format for dialing using the number's
-   *          preferred_domestic_carrier_code, or the fallbackCarrierCode passed in if none is found
+   *     {@code preferredDomesticCarrierCode}, or the {@code fallbackCarrierCode} passed in if
+   *     none is found
    */
   public String formatNationalNumberWithPreferredCarrierCode(PhoneNumber number,
                                                              String fallbackCarrierCode) {
@@ -914,56 +967,55 @@
   }
 
   /**
-   * Formats a phone number for out-of-country dialing purpose. If no countryCallingFrom
-   * is supplied, we format the number in its INTERNATIONAL format. If the countryCallingFrom is
-   * the same as the country where the number is from, then NATIONAL formatting will be applied.
+   * Formats a phone number for out-of-country dialing purposes. If no regionCallingFrom is
+   * supplied, we format the number in its INTERNATIONAL format. If the country calling code is the
+   * same as the region where the number is from, then NATIONAL formatting will be applied.
    *
-   * If the number itself has a country code of zero or an otherwise invalid country code, then we
-   * return the number with no formatting applied.
+   * <p>If the number itself has a country calling code of zero or an otherwise invalid country
+   * calling code, then we return the number with no formatting applied.
    *
-   * Note this function takes care of the case for calling inside of NANPA and between Russia and
-   * Kazakhstan (who share the same country code). In those cases, no international prefix is used.
-   * For countries which have multiple international prefixes, the number in its INTERNATIONAL
-   * format will be returned instead.
+   * <p>Note this function takes care of the case for calling inside of NANPA and between Russia and
+   * Kazakhstan (who share the same country calling code). In those cases, no international prefix
+   * is used. For regions which have multiple international prefixes, the number in its
+   * INTERNATIONAL format will be returned instead.
    *
    * @param number               the phone number to be formatted
-   * @param countryCallingFrom   the ISO 3166-1 two-letter country code that denotes
-   *                             the foreign country where the call is being placed
+   * @param regionCallingFrom    the ISO 3166-1 two-letter region code that denotes the region
+   *                             where the call is being placed
    * @return  the formatted phone number
    */
-  public String formatOutOfCountryCallingNumber(PhoneNumber number,
-                                                String countryCallingFrom) {
-    if (!isValidRegionCode(countryCallingFrom)) {
+  public String formatOutOfCountryCallingNumber(PhoneNumber number, String regionCallingFrom) {
+    if (!isValidRegionCode(regionCallingFrom)) {
       return format(number, PhoneNumberFormat.INTERNATIONAL);
     }
-    int countryCode = number.getCountryCode();
-    String regionCode = getRegionCodeForCountryCode(countryCode);
+    int countryCallingCode = number.getCountryCode();
+    String regionCode = getRegionCodeForCountryCode(countryCallingCode);
     String nationalSignificantNumber = getNationalSignificantNumber(number);
     if (!isValidRegionCode(regionCode)) {
       return nationalSignificantNumber;
     }
-    if (countryCode == NANPA_COUNTRY_CODE) {
-      if (isNANPACountry(countryCallingFrom)) {
-        // For NANPA countries, return the national format for these countries but prefix it with
-        // the country code.
-        return countryCode + " " + format(number, PhoneNumberFormat.NATIONAL);
+    if (countryCallingCode == NANPA_COUNTRY_CODE) {
+      if (isNANPACountry(regionCallingFrom)) {
+        // For NANPA regions, return the national format for these regions but prefix it with the
+        // country calling code.
+        return countryCallingCode + " " + format(number, PhoneNumberFormat.NATIONAL);
       }
-    } else if (countryCode == getCountryCodeForRegion(countryCallingFrom)) {
-    // For countries that share a country calling code, the country code need not be dialled. This
-    // also applies when dialling within a country, so this if clause covers both these cases.
-    // Technically this is the case for dialling from la Reunion to other overseas departments of
+    } else if (countryCallingCode == getCountryCodeForRegion(regionCallingFrom)) {
+    // For regions that share a country calling code, the country calling code need not be dialled.
+    // This also applies when dialling within a region, so this if clause covers both these cases.
+    // Technically this is the case for dialling from La Reunion to other overseas departments of
     // France (French Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover this
-    // edge case for now and for those cases return the version including country code.
+    // edge case for now and for those cases return the version including country calling code.
     // Details here: http://www.petitfute.com/voyage/225-info-pratiques-reunion
       return format(number, PhoneNumberFormat.NATIONAL);
     }
     String formattedNationalNumber =
         formatNationalNumber(nationalSignificantNumber,
                              regionCode, PhoneNumberFormat.INTERNATIONAL);
-    PhoneMetadata metadata = getMetadataForRegion(countryCallingFrom);
+    PhoneMetadata metadata = getMetadataForRegion(regionCallingFrom);
     String internationalPrefix = metadata.getInternationalPrefix();
 
-    // For countries that have multiple international prefixes, the international format of the
+    // For regions that have multiple international prefixes, the international format of the
     // number is returned, unless there is a preferred international prefix.
     String internationalPrefixForFormatting = "";
     if (UNIQUE_INTERNATIONAL_PREFIX.matcher(internationalPrefix).matches()) {
@@ -972,13 +1024,14 @@
       internationalPrefixForFormatting = metadata.getPreferredInternationalPrefix();
     }
 
-    StringBuffer formattedNumber = new StringBuffer(formattedNationalNumber);
-    maybeGetFormattedExtension(number, regionCode, formattedNumber);
+    StringBuilder formattedNumber = new StringBuilder(formattedNationalNumber);
+    maybeGetFormattedExtension(number, regionCode, PhoneNumberFormat.INTERNATIONAL,
+                               formattedNumber);
     if (internationalPrefixForFormatting.length() > 0) {
-      formattedNumber.insert(0, " ").insert(0, countryCode).insert(0, " ")
+      formattedNumber.insert(0, " ").insert(0, countryCallingCode).insert(0, " ")
           .insert(0, internationalPrefixForFormatting);
     } else {
-      formatNumberByFormat(countryCode,
+      formatNumberByFormat(countryCallingCode,
                            PhoneNumberFormat.INTERNATIONAL,
                            formattedNumber);
     }
@@ -991,12 +1044,12 @@
    * passed in. If such information is missing, the number will be formatted into the NATIONAL
    * format by default.
    *
-   * @param number  the PhoneNumber that needs to be formatted in its original number format
-   * @param countryCallingFrom  the country whose IDD needs to be prefixed if the original number
+   * @param number  the phone number that needs to be formatted in its original number format
+   * @param regionCallingFrom  the region whose IDD needs to be prefixed if the original number
    *     has one
    * @return  the formatted phone number in its original number format
    */
-  public String formatInOriginalFormat(PhoneNumber number, String countryCallingFrom) {
+  public String formatInOriginalFormat(PhoneNumber number, String regionCallingFrom) {
     if (!number.hasCountryCodeSource()) {
       return format(number, PhoneNumberFormat.NATIONAL);
     }
@@ -1004,7 +1057,7 @@
       case FROM_NUMBER_WITH_PLUS_SIGN:
         return format(number, PhoneNumberFormat.INTERNATIONAL);
       case FROM_NUMBER_WITH_IDD:
-        return formatOutOfCountryCallingNumber(number, countryCallingFrom);
+        return formatOutOfCountryCallingNumber(number, regionCallingFrom);
       case FROM_NUMBER_WITHOUT_PLUS_SIGN:
         return format(number, PhoneNumberFormat.INTERNATIONAL).substring(1);
       case FROM_DEFAULT_COUNTRY:
@@ -1014,23 +1067,122 @@
   }
 
   /**
+   * Formats a phone number for out-of-country dialing purposes.
+   *
+   * Note that in this version, if the number was entered originally using alpha characters and
+   * this version of the number is stored in raw_input, this representation of the number will be
+   * used rather than the digit representation. Grouping information, as specified by characters
+   * such as "-" and " ", will be retained.
+   *
+   * <p><b>Caveats:</b></p>
+   * <ul>
+   *  <li> This will not produce good results if the country calling code is both present in the raw
+   *       input _and_ is the start of the national number. This is not a problem in the regions
+   *       which typically use alpha numbers.
+   *  <li> This will also not produce good results if the raw input has any grouping information
+   *       within the first three digits of the national number, and if the function needs to strip
+   *       preceding digits/words in the raw input before these digits. Normally people group the
+   *       first three digits together so this is not a huge problem - and will be fixed if it
+   *       proves to be so.
+   * </ul>
+   *
+   * @param number  the phone number that needs to be formatted
+   * @param regionCallingFrom  the region where the call is being placed
+   * @return  the formatted phone number
+   */
+  public String formatOutOfCountryKeepingAlphaChars(PhoneNumber number, String regionCallingFrom) {
+    String rawInput = number.getRawInput();
+    // If there is no raw input, then we can't keep alpha characters because there aren't any.
+    // In this case, we return formatOutOfCountryCallingNumber.
+    if (rawInput.length() == 0) {
+      return formatOutOfCountryCallingNumber(number, regionCallingFrom);
+    }
+    int countryCode = number.getCountryCode();
+    String regionCode = getRegionCodeForCountryCode(countryCode);
+    if (!hasValidRegionCode(regionCode, countryCode, rawInput)) {
+      return rawInput;
+    }
+    // Strip any prefix such as country calling code, IDD, that was present. We do this by comparing
+    // the number in raw_input with the parsed number.
+    // To do this, first we normalize punctuation. We retain number grouping symbols such as " "
+    // only.
+    rawInput = normalizeHelper(rawInput, ALL_PLUS_NUMBER_GROUPING_SYMBOLS, true);
+    // Now we trim everything before the first three digits in the parsed number. We choose three
+    // because all valid alpha numbers have 3 digits at the start - if it does not, then we don't
+    // trim anything at all. Similarly, if the national number was less than three digits, we don't
+    // trim anything at all.
+    String nationalNumber = getNationalSignificantNumber(number);
+    if (nationalNumber.length() > 3) {
+      int firstNationalNumberDigit = rawInput.indexOf(nationalNumber.substring(0, 3));
+      if (firstNationalNumberDigit != -1) {
+        rawInput = rawInput.substring(firstNationalNumberDigit);
+      }
+    }
+    PhoneMetadata metadata = getMetadataForRegion(regionCallingFrom);
+    if (countryCode == NANPA_COUNTRY_CODE) {
+      if (isNANPACountry(regionCallingFrom)) {
+        return countryCode + " " + rawInput;
+      }
+    } else if (countryCode == getCountryCodeForRegion(regionCallingFrom)) {
+      // Here we copy the formatting rules so we can modify the pattern we expect to match against.
+      List<NumberFormat> availableFormats =
+          new ArrayList<NumberFormat>(metadata.numberFormatSize());
+      for (NumberFormat format : metadata.numberFormats()) {
+        NumberFormat newFormat = new NumberFormat();
+        newFormat.mergeFrom(format);
+        // The first group is the first group of digits that the user determined.
+        newFormat.setPattern("(\\d+)(.*)");
+        // Here we just concatenate them back together after the national prefix has been fixed.
+        newFormat.setFormat("$1$2");
+        availableFormats.add(newFormat);
+      }
+      // Now we format using these patterns instead of the default pattern, but with the national
+      // prefix prefixed if necessary, by choosing the format rule based on the leading digits
+      // present in the unformatted national number.
+      // This will not work in the cases where the pattern (and not the leading digits) decide
+      // whether a national prefix needs to be used, since we have overridden the pattern to match
+      // anything, but that is not the case in the metadata to date.
+      return formatAccordingToFormats(rawInput, availableFormats, PhoneNumberFormat.NATIONAL);
+    }
+    String internationalPrefix = metadata.getInternationalPrefix();
+    // For countries that have multiple international prefixes, the international format of the
+    // number is returned, unless there is a preferred international prefix.
+    String internationalPrefixForFormatting =
+        UNIQUE_INTERNATIONAL_PREFIX.matcher(internationalPrefix).matches()
+        ? internationalPrefix
+        : metadata.getPreferredInternationalPrefix();
+    StringBuilder formattedNumber = new StringBuilder(rawInput);
+    maybeGetFormattedExtension(number, regionCode, PhoneNumberFormat.INTERNATIONAL,
+                               formattedNumber);
+    if (internationalPrefixForFormatting.length() > 0) {
+      formattedNumber.insert(0, " ").insert(0, countryCode).insert(0, " ")
+          .insert(0, internationalPrefixForFormatting);
+    } else {
+      formatNumberByFormat(countryCode,
+                           PhoneNumberFormat.INTERNATIONAL,
+                           formattedNumber);
+    }
+    return formattedNumber.toString();
+  }
+
+  /**
    * Gets the national significant number of the a phone number. Note a national significant number
    * doesn't contain a national prefix or any formatting.
    *
    * @param number  the PhoneNumber object for which the national significant number is needed
    * @return  the national significant number of the PhoneNumber object passed in
    */
-  public static String getNationalSignificantNumber(PhoneNumber number) {
+  public String getNationalSignificantNumber(PhoneNumber number) {
     // The leading zero in the national (significant) number of an Italian phone number has a
     // special meaning. Unlike the rest of the world, it indicates the number is a landline
     // number. There have been plans to migrate landline numbers to start with the digit two since
     // December 2000, but it has not yet happened.
     // See http://en.wikipedia.org/wiki/%2B39 for more details.
-    // Other countries such as Cote d'Ivoire and Gabon use this for their mobile numbers.
-    StringBuffer nationalNumber = new StringBuffer(
+    // Other regions such as Cote d'Ivoire and Gabon use this for their mobile numbers.
+    StringBuilder nationalNumber = new StringBuilder(
         (number.hasItalianLeadingZero() &&
          number.getItalianLeadingZero() &&
-         isLeadingZeroCountry(number.getCountryCode()))
+         isLeadingZeroPossible(number.getCountryCode()))
         ? "0" : ""
     );
     nationalNumber.append(number.getNationalNumber());
@@ -1040,15 +1192,18 @@
   /**
    * A helper function that is used by format and formatByPattern.
    */
-  private void formatNumberByFormat(int countryCode,
+  private void formatNumberByFormat(int countryCallingCode,
                                     PhoneNumberFormat numberFormat,
-                                    StringBuffer formattedNumber) {
+                                    StringBuilder formattedNumber) {
     switch (numberFormat) {
       case E164:
-        formattedNumber.insert(0, countryCode).insert(0, PLUS_SIGN);
+        formattedNumber.insert(0, countryCallingCode).insert(0, PLUS_SIGN);
         return;
       case INTERNATIONAL:
-        formattedNumber.insert(0, " ").insert(0, countryCode).insert(0, PLUS_SIGN);
+        formattedNumber.insert(0, " ").insert(0, countryCallingCode).insert(0, PLUS_SIGN);
+        return;
+      case RFC3966:
+        formattedNumber.insert(0, "-").insert(0, countryCallingCode) .insert(0, PLUS_SIGN);
         return;
       case NATIONAL:
       default:
@@ -1063,7 +1218,7 @@
     return formatNationalNumber(number, regionCode, numberFormat, null);
   }
 
-  // Note in some countries, the national number can be written in two completely different ways
+  // Note in some regions, the national number can be written in two completely different ways
   // depending on whether it forms part of the NATIONAL format or INTERNATIONAL format. The
   // numberFormat parameter here is used to specify which format to use for those cases. If a
   // carrierCode is specified, this will be inserted into the formatted string to replace $CC.
@@ -1072,14 +1227,20 @@
                                       PhoneNumberFormat numberFormat,
                                       String carrierCode) {
     PhoneMetadata metadata = getMetadataForRegion(regionCode);
-    List<NumberFormat> intlNumberFormats = metadata.getIntlNumberFormatList();
+    List<NumberFormat> intlNumberFormats = metadata.intlNumberFormats();
     // When the intlNumberFormats exists, we use that to format national number for the
     // INTERNATIONAL format instead of using the numberDesc.numberFormats.
     List<NumberFormat> availableFormats =
         (intlNumberFormats.size() == 0 || numberFormat == PhoneNumberFormat.NATIONAL)
-        ? metadata.getNumberFormatList()
-        : metadata.getIntlNumberFormatList();
-    return formatAccordingToFormats(number, availableFormats, numberFormat, carrierCode);
+        ? metadata.numberFormats()
+        : metadata.intlNumberFormats();
+    String formattedNationalNumber =
+        formatAccordingToFormats(number, availableFormats, numberFormat, carrierCode);
+    if (numberFormat == PhoneNumberFormat.RFC3966) {
+      formattedNationalNumber =
+          SEPARATOR_PATTERN.matcher(formattedNationalNumber).replaceAll("-");
+    }
+    return formattedNationalNumber;
   }
 
   // Simple wrapper of formatAccordingToFormats for the common case of no carrier code.
@@ -1096,7 +1257,7 @@
                                           PhoneNumberFormat numberFormat,
                                           String carrierCode) {
     for (NumberFormat numFormat : availableFormats) {
-      int size = numFormat.getLeadingDigitsPatternCount();
+      int size = numFormat.leadingDigitsPatternSize();
       if (size == 0 || regexCache.getPatternForRegex(
               // We always use the last leading_digits_pattern, as it is the most detailed.
               numFormat.getLeadingDigitsPattern(size - 1)).matcher(nationalNumber).lookingAt()) {
@@ -1136,11 +1297,11 @@
   }
 
   /**
-   * Gets a valid number for the specified country.
+   * Gets a valid number for the specified region.
    *
-   * @param regionCode  the ISO 3166-1 two-letter country code that denotes
-   *                    the country for which an example number is needed
-   * @return  a valid fixed-line number for the specified country. Returns null when the metadata
+   * @param regionCode  the ISO 3166-1 two-letter region code that denotes
+   *                    the region for which an example number is needed
+   * @return  a valid fixed-line number for the specified region. Returns null when the metadata
    *    does not contain such information.
    */
   public PhoneNumber getExampleNumber(String regionCode) {
@@ -1148,15 +1309,20 @@
   }
 
   /**
-   * Gets a valid number for the specified country and number type.
+   * Gets a valid number for the specified region and number type.
    *
-   * @param regionCode  the ISO 3166-1 two-letter country code that denotes
-   *                    the country for which an example number is needed
+   * @param regionCode  the ISO 3166-1 two-letter region code that denotes
+   *                    the region for which an example number is needed
    * @param type  the type of number that is needed
-   * @return  a valid number for the specified country and type. Returns null when the metadata
+   * @return  a valid number for the specified region and type. Returns null when the metadata
    *     does not contain such information.
    */
   public PhoneNumber getExampleNumberForType(String regionCode, PhoneNumberType type) {
+    // Check the region code is valid.
+    if (!isValidRegionCode(regionCode)) {
+      LOGGER.log(Level.WARNING, "Invalid or unknown region code provided.");
+      return null;
+    }
     PhoneNumberDesc desc = getNumberDescByType(getMetadataForRegion(regionCode), type);
     try {
       if (desc.hasExampleNumber()) {
@@ -1173,18 +1339,28 @@
    * an extension specified.
    */
   private void maybeGetFormattedExtension(PhoneNumber number, String regionCode,
-                                          StringBuffer formattedNumber) {
-    if (number.hasExtension()) {
-      // Formats the extension part of the phone number by prefixing it with the appropriate
-      // extension prefix. This will be the default extension prefix, unless overridden by a
-      // preferred extension prefix for this country.
-      PhoneMetadata metadata = getMetadataForRegion(regionCode);
-      if (metadata.hasPreferredExtnPrefix()) {
-        formattedNumber.append(metadata.getPreferredExtnPrefix());
+                                          PhoneNumberFormat numberFormat,
+                                          StringBuilder formattedNumber) {
+    if (number.hasExtension() && number.getExtension().length() > 0) {
+      if (numberFormat == PhoneNumberFormat.RFC3966) {
+        formattedNumber.append(RFC3966_EXTN_PREFIX).append(number.getExtension());
       } else {
-        formattedNumber.append(DEFAULT_EXTN_PREFIX);
+        formatExtension(number.getExtension(), regionCode, formattedNumber);
       }
-      formattedNumber.append(number.getExtension());
+    }
+  }
+
+  /**
+   * Formats the extension part of the phone number by prefixing it with the appropriate extension
+   * prefix. This will be the default extension prefix, unless overridden by a preferred
+   * extension prefix for this region.
+   */
+  private void formatExtension(String extensionDigits, String regionCode, StringBuilder extension) {
+    PhoneMetadata metadata = getMetadataForRegion(regionCode);
+    if (metadata.hasPreferredExtnPrefix()) {
+      extension.append(metadata.getPreferredExtnPrefix()).append(extensionDigits);
+    } else {
+      extension.append(DEFAULT_EXTN_PREFIX).append(extensionDigits);
     }
   }
 
@@ -1281,10 +1457,10 @@
       return null;
     }
     regionCode = regionCode.toUpperCase();
-    if (!countryToMetadataMap.containsKey(regionCode)) {
+    if (!regionToMetadataMap.containsKey(regionCode)) {
       loadMetadataForRegionFromFile(currentFilePrefix, regionCode);
     }
-    return countryToMetadataMap.get(regionCode);
+    return regionToMetadataMap.get(regionCode);
   }
 
   private boolean isNumberMatchingDesc(String nationalNumber, PhoneNumberDesc numberDesc) {
@@ -1312,14 +1488,14 @@
   /**
    * Tests whether a phone number is valid for a certain region. Note this doesn't verify the number
    * is actually in use, which is impossible to tell by just looking at a number itself. If the
-   * country code is not the same as the country code for the region, this immediately exits with
-   * false. After this, the specific number pattern rules for the region are examined. This is
-   * useful for determining for example whether a particular number is valid for Canada, rather than
-   * just a valid NANPA number.
+   * country calling code is not the same as the country calling code for the region, this
+   * immediately exits with false. After this, the specific number pattern rules for the region are
+   * examined. This is useful for determining for example whether a particular number is valid for
+   * Canada, rather than just a valid NANPA number.
    *
    * @param number       the phone number that we want to validate
-   * @param regionCode   the ISO 3166-1 two-letter country code that denotes
-   *                     the region/country that we want to validate the phone number for
+   * @param regionCode   the ISO 3166-1 two-letter region code that denotes the region that we want
+   *                     to validate the phone number for
    * @return  a boolean that indicates whether the number is of a valid pattern
    */
   public boolean isValidNumberForRegion(PhoneNumber number, String regionCode) {
@@ -1330,8 +1506,8 @@
     PhoneNumberDesc generalNumDesc = metadata.getGeneralDesc();
     String nationalSignificantNumber = getNationalSignificantNumber(number);
 
-    // For countries where we don't have metadata for PhoneNumberDesc, we treat any number passed
-    // in as a valid number if its national significant number is between the minimum and maximum
+    // For regions where we don't have metadata for PhoneNumberDesc, we treat any number passed in
+    // as a valid number if its national significant number is between the minimum and maximum
     // lengths defined by ITU for a national significant number.
     if (!generalNumDesc.hasNationalNumberPattern()) {
       int numberLength = nationalSignificantNumber.length();
@@ -1341,16 +1517,16 @@
   }
 
   /**
-   * Returns the country/region where a phone number is from. This could be used for geo-coding in
-   * the country/region level.
+   * Returns the region where a phone number is from. This could be used for geocoding at the region
+   * level.
    *
    * @param number  the phone number whose origin we want to know
-   * @return  the country/region where the phone number is from, or null if no country matches this
-   *     calling code.
+   * @return  the region where the phone number is from, or null if no region matches this calling
+   *     code
    */
   public String getRegionCodeForNumber(PhoneNumber number) {
     int countryCode = number.getCountryCode();
-    List<String> regions = countryCodeToRegionCodeMap.get(countryCode);
+    List<String> regions = countryCallingCodeToRegionCodeMap.get(countryCode);
     if (regions == null) {
       return null;
     }
@@ -1363,7 +1539,7 @@
 
   private String getRegionCodeForNumberFromRegionList(PhoneNumber number,
                                                       List<String> regionCodes) {
-    String nationalNumber = String.valueOf(number.getNationalNumber());
+    String nationalNumber = getNationalSignificantNumber(number);
     for (String regionCode : regionCodes) {
       // If leadingDigits is present, use this. Otherwise, do full validation.
       PhoneMetadata metadata = getMetadataForRegion(regionCode);
@@ -1380,12 +1556,12 @@
   }
 
   /**
-   * Returns the region code that matches the specific country code. In the case of no region code
-   * being found, ZZ will be returned. In the case of multiple regions, the one designated in the
-   * metadata as the "main" country for this calling code will be returned.
+   * Returns the region code that matches the specific country calling code. In the case of no
+   * region code being found, ZZ will be returned. In the case of multiple regions, the one
+   * designated in the metadata as the "main" region for this calling code will be returned.
    */
-  public String getRegionCodeForCountryCode(int countryCode) {
-    List<String> regionCodes = countryCodeToRegionCodeMap.get(countryCode);
+  public String getRegionCodeForCountryCode(int countryCallingCode) {
+    List<String> regionCodes = countryCallingCodeToRegionCodeMap.get(countryCallingCode);
     return regionCodes == null ? UNKNOWN_REGION : regionCodes.get(0);
   }
 
@@ -1393,18 +1569,15 @@
    * Returns the country calling code for a specific region. For example, this would be 1 for the
    * United States, and 64 for New Zealand.
    *
-   * @param regionCode  the ISO 3166-1 two-letter country code that denotes
-   *                    the country/region that we want to get the country code for
-   * @return  the country calling code for the country/region denoted by regionCode
+   * @param regionCode  the ISO 3166-1 two-letter region code that denotes
+   *                    the region that we want to get the country calling code for
+   * @return  the country calling code for the region denoted by regionCode
    */
   public int getCountryCodeForRegion(String regionCode) {
     if (!isValidRegionCode(regionCode)) {
       return 0;
     }
     PhoneMetadata metadata = getMetadataForRegion(regionCode);
-    if (metadata == null) {
-      return 0;
-    }
     return metadata.getCountryCode();
   }
 
@@ -1414,25 +1587,21 @@
    * (which indicates a wait for a dialling tone) from the prefix returned. If no national prefix is
    * present, we return null.
    *
-   * Warning: Do not use this method for do-your-own formatting - for some countries, the national
-   * dialling prefix is used only for certain types of numbers. Use the library's formatting
-   * functions to prefix the national prefix when required.
+   * <p>Warning: Do not use this method for do-your-own formatting - for some regions, the
+   * national dialling prefix is used only for certain types of numbers. Use the library's
+   * formatting functions to prefix the national prefix when required.
    *
-   * @param regionCode  the ISO 3166-1 two-letter country code that denotes
-   *                    the country/region that we want to get the dialling prefix for
+   * @param regionCode  the ISO 3166-1 two-letter region code that denotes
+   *                    the region that we want to get the dialling prefix for
    * @param stripNonDigits  true to strip non-digits from the national dialling prefix
-   * @return  the dialling prefix for the country/region denoted by regionCode
+   * @return  the dialling prefix for the region denoted by regionCode
    */
   public String getNddPrefixForRegion(String regionCode, boolean stripNonDigits) {
     if (!isValidRegionCode(regionCode)) {
-      LOGGER.log(Level.SEVERE, "Invalid or missing country code provided.");
+      LOGGER.log(Level.SEVERE, "Invalid or missing region code provided.");
       return null;
     }
     PhoneMetadata metadata = getMetadataForRegion(regionCode);
-    if (metadata == null) {
-      LOGGER.log(Level.SEVERE, "Unsupported country code provided.");
-      return null;
-    }
     String nationalPrefix = metadata.getNationalPrefix();
     // If no national prefix was found, we return null.
     if (nationalPrefix.length() == 0) {
@@ -1447,26 +1616,51 @@
   }
 
   /**
-   * Check if a country is one of the countries under the North American Numbering Plan
-   * Administration (NANPA).
+   * Checks if this is a region under the North American Numbering Plan Administration (NANPA).
    *
-   * @return  true if regionCode is one of the countries under NANPA
+   * @return  true if regionCode is one of the regions under NANPA
    */
   public boolean isNANPACountry(String regionCode) {
-    return regionCode != null && nanpaCountries.contains(regionCode.toUpperCase());
+    return regionCode != null && nanpaRegions.contains(regionCode.toUpperCase());
   }
 
   /**
-   * Check whether countryCode represents the country calling code from a country whose national
-   * significant number could contain a leading zero. An example of such a country is Italy.
+   * Checks whether countryCode represents the country calling code from a region whose national
+   * significant number could contain a leading zero. An example of such a region is Italy. Returns
+   * false if no metadata for the country is found.
    */
-  public static boolean isLeadingZeroCountry(int countryCode) {
-    return LEADING_ZERO_COUNTRIES.contains(countryCode);
+  boolean isLeadingZeroPossible(int countryCallingCode) {
+    PhoneMetadata mainMetadataForCallingCode = getMetadataForRegion(
+        getRegionCodeForCountryCode(countryCallingCode));
+    if (mainMetadataForCallingCode == null) {
+      return false;
+    }
+    return mainMetadataForCallingCode.isLeadingZeroPossible();
   }
 
   /**
-   * Convenience wrapper around isPossibleNumberWithReason. Instead of returning the reason for
-   * failure, this method returns a boolean value.
+   * Checks if the number is a valid vanity (alpha) number such as 800 MICROSOFT. A valid vanity
+   * number will start with at least 3 digits and will have three or more alpha characters. This
+   * does not do region-specific checks - to work out if this number is actually valid for a region,
+   * it should be parsed and methods such as {@link #isPossibleNumberWithReason} and
+   * {@link #isValidNumber} should be used.
+   *
+   * @param number  the number that needs to be checked
+   * @return  true if the number is a valid vanity number
+   */
+  public boolean isAlphaNumber(String number) {
+    if (!isViablePhoneNumber(number)) {
+      // Number is too short, or doesn't match the basic phone number pattern.
+      return false;
+    }
+    StringBuilder strippedNumber = new StringBuilder(number);
+    maybeStripExtension(strippedNumber);
+    return VALID_ALPHA_PHONE_PATTERN.matcher(strippedNumber).matches();
+  }
+
+  /**
+   * Convenience wrapper around {@link #isPossibleNumberWithReason}. Instead of returning the reason
+   * for failure, this method returns a boolean value.
    * @param number  the number that needs to be checked
    * @return  true if the number is possible
    */
@@ -1475,14 +1669,33 @@
   }
 
   /**
+   * Helper method to check a number against a particular pattern and determine whether it matches,
+   * or is too short or too long. Currently, if a number pattern suggests that numbers of length 7
+   * and 10 are possible, and a number in between these possible lengths is entered, such as of
+   * length 8, this will return TOO_LONG.
+   */
+  private ValidationResult testNumberLengthAgainstPattern(Pattern numberPattern, String number) {
+    Matcher numberMatcher = numberPattern.matcher(number);
+    if (numberMatcher.matches()) {
+      return ValidationResult.IS_POSSIBLE;
+    }
+    if (numberMatcher.lookingAt()) {
+      return ValidationResult.TOO_LONG;
+    } else {
+      return ValidationResult.TOO_SHORT;
+    }
+  }
+
+  /**
    * Check whether a phone number is a possible number. It provides a more lenient check than
-   * isValidNumber in the following sense:
-   *   1. It only checks the length of phone numbers. In particular, it doesn't check starting
+   * {@link #isValidNumber} in the following sense:
+   *<ol>
+   * <li> It only checks the length of phone numbers. In particular, it doesn't check starting
    *      digits of the number.
-   *   2. It doesn't attempt to figure out the type of the number, but uses general rules which
-   *      applies to all types of phone numbers in a country. Therefore, it is much faster than
+   * <li> It doesn't attempt to figure out the type of the number, but uses general rules which
+   *      applies to all types of phone numbers in a region. Therefore, it is much faster than
    *      isValidNumber.
-   *   3. For fixed line numbers, many countries have the concept of area code, which together with
+   * <li> For fixed line numbers, many regions have the concept of area code, which together with
    *      subscriber number constitute the national significant number. It is sometimes okay to dial
    *      the subscriber number only when dialing in the same area. This function will return
    *      true if the subscriber-number-only version is passed in. On the other hand, because
@@ -1490,21 +1703,21 @@
    *      numbers, that would most likely be area codes) and length (obviously includes the
    *      length of area codes for fixed line numbers), it will return false for the
    *      subscriber-number-only version.
-   *
+   * </ol
    * @param number  the number that needs to be checked
    * @return  a ValidationResult object which indicates whether the number is possible
    */
   public ValidationResult isPossibleNumberWithReason(PhoneNumber number) {
+    String nationalNumber = getNationalSignificantNumber(number);
     int countryCode = number.getCountryCode();
     // Note: For Russian Fed and NANPA numbers, we just use the rules from the default region (US or
     // Russia) since the getRegionCodeForNumber will not work if the number is possible but not
     // valid. This would need to be revisited if the possible number pattern ever differed between
-    // various countries within those plans.
+    // various regions within those plans.
     String regionCode = getRegionCodeForCountryCode(countryCode);
     if (!isValidRegionCode(regionCode)) {
       return ValidationResult.INVALID_COUNTRY_CODE;
     }
-    String nationalNumber = getNationalSignificantNumber(number);
     PhoneNumberDesc generalNumDesc = getMetadataForRegion(regionCode).getGeneralDesc();
     // Handling case of numbers with no metadata.
     if (!generalNumDesc.hasNationalNumberPattern()) {
@@ -1518,39 +1731,34 @@
         return ValidationResult.IS_POSSIBLE;
       }
     }
-    String possibleNumberPattern = generalNumDesc.getPossibleNumberPattern();
-    Matcher m = regexCache.getPatternForRegex(possibleNumberPattern).matcher(nationalNumber);
-    if (m.lookingAt()) {
-      return (m.end() == nationalNumber.length()) ? ValidationResult.IS_POSSIBLE
-                                                  : ValidationResult.TOO_LONG;
-    } else {
-      return ValidationResult.TOO_SHORT;
-    }
+    Pattern possibleNumberPattern =
+        regexCache.getPatternForRegex(generalNumDesc.getPossibleNumberPattern());
+    return testNumberLengthAgainstPattern(possibleNumberPattern, nationalNumber);
   }
 
   /**
    * Check whether a phone number is a possible number given a number in the form of a string, and
-   * the country where the number could be dialed from. It provides a more lenient check than
-   * isValidNumber. See isPossibleNumber(PhoneNumber number) for details.
+   * the region where the number could be dialed from. It provides a more lenient check than
+   * {@link #isValidNumber}. See {@link #isPossibleNumber(PhoneNumber)} for details.
    *
-   * This method first parses the number, then invokes isPossibleNumber(PhoneNumber number) with the
-   * resultant PhoneNumber object.
+   * <p>This method first parses the number, then invokes {@link #isPossibleNumber(PhoneNumber
+   * number)} with the resultant PhoneNumber object.
    *
    * @param number  the number that needs to be checked, in the form of a string
-   * @param countryDialingFrom  the ISO 3166-1 two-letter country code that denotes
-   *     the country that we are expecting the number to be dialed from.
-   *     Note this is different from the country where the number belongs. For example, the number
-   *     +1 650 253 0000 is a number that belongs to US. When written in this form, it could be
-   *     dialed from any country. When it is written as 00 1 650 253 0000, it could be dialed from
-   *     any country which uses an international dialling prefix of 00. When it is written as 650
-   *     253 0000, it could only be dialed from within the US, and when written as 253 0000, it
-   *     could only be dialed from within a smaller area in the US (Mountain View, CA, to be more
+   * @param regionDialingFrom  the ISO 3166-1 two-letter region code that denotes the region that
+   *     we are expecting the number to be dialed from.
+   *     Note this is different from the region where the number belongs.  For example, the number
+   *     +1 650 253 0000 is a number that belongs to US. When written in this form, it can be
+   *     dialed from any region. When it is written as 00 1 650 253 0000, it can be dialed from any
+   *     region which uses an international dialling prefix of 00. When it is written as
+   *     650 253 0000, it can only be dialed from within the US, and when written as 253 0000, it
+   *     can only be dialed from within a smaller area in the US (Mountain View, CA, to be more
    *     specific).
    * @return  true if the number is possible
    */
-  public boolean isPossibleNumber(String number, String countryDialingFrom) {
+  public boolean isPossibleNumber(String number, String regionDialingFrom) {
     try {
-      return isPossibleNumber(parse(number, countryDialingFrom));
+      return isPossibleNumber(parse(number, regionDialingFrom));
     } catch (NumberParseException e) {
       return false;
     }
@@ -1583,27 +1791,28 @@
   }
 
   /**
-   * Gets an AsYouTypeFormatter for the specific country.
+   * Gets an {@link com.google.i18n.phonenumbers.AsYouTypeFormatter} for the specific region.
    *
-   * @param regionCode  the ISO 3166-1 two-letter country code that denotes the
-   *     country/region where the phone number is being entered
+   * @param regionCode  the ISO 3166-1 two-letter region code that denotes the region where
+   *     the phone number is being entered
    *
-   * @return  an AsYouTypeFormatter object, which could be used to format phone numbers in the
-   *     specific country "as you type"
+   * @return  an {@link com.google.i18n.phonenumbers.AsYouTypeFormatter} object, which can be used
+   *     to format phone numbers in the specific region "as you type"
    */
   public AsYouTypeFormatter getAsYouTypeFormatter(String regionCode) {
     return new AsYouTypeFormatter(regionCode);
   }
 
-  // Extracts country code from fullNumber, returns it and places the remaining number in
+  // Extracts country calling code from fullNumber, returns it and places the remaining number in
   // nationalNumber. It assumes that the leading plus sign or IDD has already been removed. Returns
-  // 0 if fullNumber doesn't start with a valid country code, and leaves nationalNumber unmodified.
-  int extractCountryCode(StringBuffer fullNumber, StringBuffer nationalNumber) {
+  // 0 if fullNumber doesn't start with a valid country calling code, and leaves nationalNumber
+  // unmodified.
+  int extractCountryCode(StringBuilder fullNumber, StringBuilder nationalNumber) {
     int potentialCountryCode;
     int numberLength = fullNumber.length();
     for (int i = 1; i <= MAX_LENGTH_COUNTRY_CODE && i <= numberLength; i++) {
       potentialCountryCode = Integer.parseInt(fullNumber.substring(0, i));
-      if (countryCodeToRegionCodeMap.containsKey(potentialCountryCode)) {
+      if (countryCallingCodeToRegionCodeMap.containsKey(potentialCountryCode)) {
         nationalNumber.append(fullNumber.substring(i));
         return potentialCountryCode;
       }
@@ -1612,41 +1821,44 @@
   }
 
   /**
-   * Tries to extract a country code from a number. This method will return zero if no country code
-   * is considered to be present. Country codes are extracted in the following ways:
-   *     - by stripping the international dialing prefix of the country the person is dialing from,
+   * Tries to extract a country calling code from a number. This method will return zero if no
+   * country calling code is considered to be present. Country calling codes are extracted in the
+   * following ways:
+   * <ul>
+   *  <li> by stripping the international dialing prefix of the region the person is dialing from,
    *       if this is present in the number, and looking at the next digits
-   *     - by stripping the '+' sign if present and then looking at the next digits
-   *     - by comparing the start of the number and the country code of the default region. If the
-   *       number is not considered possible for the numbering plan of the default region initially,
-   *       but starts with the country code of this region, validation will be reattempted after
-   *       stripping this country code. If this number is considered a possible number, then the
-   *       first digits will be considered the country code and removed as such.
+   *  <li> by stripping the '+' sign if present and then looking at the next digits
+   *  <li> by comparing the start of the number and the country calling code of the default region.
+   *       If the number is not considered possible for the numbering plan of the default region
+   *       initially, but starts with the country calling code of this region, validation will be
+   *       reattempted after stripping this country calling code. If this number is considered a
+   *       possible number, then the first digits will be considered the country calling code and
+   *       removed as such.
+   * </ul>
+   * It will throw a NumberParseException if the number starts with a '+' but the country calling
+   * code supplied after this does not match that of any known region.
    *
-   * It will throw a NumberParseException if the number starts with a '+' but the country code
-   * supplied after this does not match that of any known country.
-   *
-   * @param number  non-normalized telephone number that we wish to extract a country
+   * @param number  non-normalized telephone number that we wish to extract a country calling
    *     code from - may begin with '+'
    * @param defaultRegionMetadata  metadata about the region this number may be from
    * @param nationalNumber  a string buffer to store the national significant number in, in the case
-   *     that a country code was extracted. The number is appended to any existing contents. If no
-   *     country code was extracted, this will be left unchanged.
+   *     that a country calling code was extracted. The number is appended to any existing contents.
+   *     If no country calling code was extracted, this will be left unchanged.
    * @param keepRawInput  true if the country_code_source and preferred_carrier_code fields of
    *     phoneNumber should be populated.
-   * @param phoneNumber  the PhoneNumber object that needs to be populated with country code and
-   *     country code source. Note the country code is always populated, whereas country code source
-   *     is only populated when keepCountryCodeSource is true.
-   * @return  the country code extracted or 0 if none could be extracted
+   * @param phoneNumber  the PhoneNumber object where the country_code and country_code_source need
+   *     to be populated. Note the country_code is always populated, whereas country_code_source is
+   *     only populated when keepCountryCodeSource is true.
+   * @return  the country calling code extracted or 0 if none could be extracted
    */
   int maybeExtractCountryCode(String number, PhoneMetadata defaultRegionMetadata,
-                              StringBuffer nationalNumber, boolean keepRawInput,
+                              StringBuilder nationalNumber, boolean keepRawInput,
                               PhoneNumber phoneNumber)
       throws NumberParseException {
     if (number.length() == 0) {
       return 0;
     }
-    StringBuffer fullNumber = new StringBuffer(number);
+    StringBuilder fullNumber = new StringBuilder(number);
     // Set the default prefix to be something that will never match.
     String possibleCountryIddPrefix = "NonMatch";
     if (defaultRegionMetadata != null) {
@@ -1670,44 +1882,43 @@
         return potentialCountryCode;
       }
 
-      // If this fails, they must be using a strange country code that we don't recognize, or
-      // that doesn't exist.
+      // If this fails, they must be using a strange country calling code that we don't recognize,
+      // or that doesn't exist.
       throw new NumberParseException(NumberParseException.ErrorType.INVALID_COUNTRY_CODE,
-                                     "Country code supplied was not recognised.");
+                                     "Country calling code supplied was not recognised.");
     } else if (defaultRegionMetadata != null) {
-      // Check to see if the number is valid for the default region already. If not, we check to
-      // see if the country code for the default region is present at the start of the number.
-      PhoneNumberDesc generalDesc = defaultRegionMetadata.getGeneralDesc();
-      Pattern validNumberPattern =
-          regexCache.getPatternForRegex(generalDesc.getNationalNumberPattern());
-      if (!validNumberPattern.matcher(fullNumber).matches()) {
-        int defaultCountryCode = defaultRegionMetadata.getCountryCode();
-        String defaultCountryCodeString = String.valueOf(defaultCountryCode);
-        String normalizedNumber = fullNumber.toString();
-        if (normalizedNumber.startsWith(defaultCountryCodeString)) {
-          // If so, strip this, and see if the resultant number is valid.
-          StringBuffer potentialNationalNumber =
-              new StringBuffer(normalizedNumber.substring(defaultCountryCodeString.length()));
-          maybeStripNationalPrefixAndCarrierCode(potentialNationalNumber, defaultRegionMetadata);
-          Matcher possibleNumberMatcher =
-              regexCache.getPatternForRegex(generalDesc.getPossibleNumberPattern()).matcher(
-                  potentialNationalNumber);
-          // If the resultant number is either valid, or still too long even with the country code
-          // stripped, we consider this a better result and keep the potential national number.
-          if (validNumberPattern.matcher(potentialNationalNumber).matches() ||
-              (possibleNumberMatcher.lookingAt() &&
-               possibleNumberMatcher.end() != potentialNationalNumber.length())) {
-            nationalNumber.append(potentialNationalNumber);
-            if (keepRawInput) {
-              phoneNumber.setCountryCodeSource(CountryCodeSource.FROM_NUMBER_WITHOUT_PLUS_SIGN);
-            }
-            phoneNumber.setCountryCode(defaultCountryCode);
-            return defaultCountryCode;
+      // Check to see if the number starts with the country calling code for the default region. If
+      // so, we remove the country calling code, and do some checks on the validity of the number
+      // before and after.
+      int defaultCountryCode = defaultRegionMetadata.getCountryCode();
+      String defaultCountryCodeString = String.valueOf(defaultCountryCode);
+      String normalizedNumber = fullNumber.toString();
+      if (normalizedNumber.startsWith(defaultCountryCodeString)) {
+        StringBuilder potentialNationalNumber =
+            new StringBuilder(normalizedNumber.substring(defaultCountryCodeString.length()));
+        PhoneNumberDesc generalDesc = defaultRegionMetadata.getGeneralDesc();
+        Pattern validNumberPattern =
+            regexCache.getPatternForRegex(generalDesc.getNationalNumberPattern());
+        maybeStripNationalPrefixAndCarrierCode(potentialNationalNumber, defaultRegionMetadata);
+        Pattern possibleNumberPattern =
+            regexCache.getPatternForRegex(generalDesc.getPossibleNumberPattern());
+        // If the number was not valid before but is valid now, or if it was too long before, we
+        // consider the number with the country calling code stripped to be a better result and
+        // keep that instead.
+        if ((!validNumberPattern.matcher(fullNumber).matches() &&
+             validNumberPattern.matcher(potentialNationalNumber).matches()) ||
+             testNumberLengthAgainstPattern(possibleNumberPattern, fullNumber.toString())
+                  == ValidationResult.TOO_LONG) {
+          nationalNumber.append(potentialNationalNumber);
+          if (keepRawInput) {
+            phoneNumber.setCountryCodeSource(CountryCodeSource.FROM_NUMBER_WITHOUT_PLUS_SIGN);
           }
+          phoneNumber.setCountryCode(defaultCountryCode);
+          return defaultCountryCode;
         }
       }
     }
-    // No country code present.
+    // No country calling code present.
     phoneNumber.setCountryCode(0);
     return 0;
   }
@@ -1716,12 +1927,12 @@
    * Strips the IDD from the start of the number if present. Helper function used by
    * maybeStripInternationalPrefixAndNormalize.
    */
-  private boolean parsePrefixAsIdd(Pattern iddPattern, StringBuffer number) {
+  private boolean parsePrefixAsIdd(Pattern iddPattern, StringBuilder number) {
     Matcher m = iddPattern.matcher(number);
     if (m.lookingAt()) {
       int matchEnd = m.end();
-      // Only strip this if the first digit after the match is not a 0, since country codes cannot
-      // begin with 0.
+      // Only strip this if the first digit after the match is not a 0, since country calling codes
+      // cannot begin with 0.
       Matcher digitMatcher = CAPTURING_DIGIT_PATTERN.matcher(number.substring(matchEnd));
       if (digitMatcher.find()) {
         String normalizedGroup = normalizeHelper(digitMatcher.group(1), DIGIT_MAPPINGS, true);
@@ -1741,14 +1952,14 @@
    *
    * @param number  the non-normalized telephone number that we wish to strip any international
    *     dialing prefix from.
-   * @param possibleIddPrefix  the international direct dialing prefix from the country we
+   * @param possibleIddPrefix  the international direct dialing prefix from the region we
    *     think this number may be dialed in
    * @return  the corresponding CountryCodeSource if an international dialing prefix could be
-   *          removed from the number, otherwise CountryCodeSource.FROM_DEFAULT_COUNTRY if the
-   *          number did not seem to be in international format.
+   *     removed from the number, otherwise CountryCodeSource.FROM_DEFAULT_COUNTRY if the number did
+   *     not seem to be in international format.
    */
   CountryCodeSource maybeStripInternationalPrefixAndNormalize(
-      StringBuffer number,
+      StringBuilder number,
       String possibleIddPrefix) {
     if (number.length() == 0) {
       return CountryCodeSource.FROM_DEFAULT_COUNTRY;
@@ -1781,10 +1992,10 @@
    *
    * @param number  the normalized telephone number that we wish to strip any national
    *     dialing prefix from
-   * @param metadata  the metadata for the country that we think this number is from
+   * @param metadata  the metadata for the region that we think this number is from
    * @return the carrier code extracted if it is present, otherwise return an empty string.
    */
-  String maybeStripNationalPrefixAndCarrierCode(StringBuffer number, PhoneMetadata metadata) {
+  String maybeStripNationalPrefixAndCarrierCode(StringBuilder number, PhoneMetadata metadata) {
     String carrierCode = "";
     int numberLength = number.length();
     String possibleNationalPrefix = metadata.getNationalPrefixForParsing();
@@ -1816,7 +2027,7 @@
       } else {
         // Check that the resultant number is viable. If not, return. Check this by copying the
         // string buffer and making the transformation on the copy first.
-        StringBuffer transformedNumber = new StringBuffer(number);
+        StringBuilder transformedNumber = new StringBuilder(number);
         transformedNumber.replace(0, numberLength, prefixMatcher.replaceFirst(transformRule));
         Matcher nationalNumber = nationalNumberRule.matcher(transformedNumber.toString());
         if (!nationalNumber.matches()) {
@@ -1838,7 +2049,7 @@
    * @param number  the non-normalized telephone number that we wish to strip the extension from
    * @return        the phone extension
    */
-  String maybeStripExtension(StringBuffer number) {
+  String maybeStripExtension(StringBuilder number) {
     Matcher m = EXTN_PATTERN.matcher(number);
     // If we find a potential extension, and the number preceding this is a viable number, we assume
     // it is an extension.
@@ -1859,12 +2070,12 @@
 
   /**
    * Checks to see that the region code used is valid, or if it is not valid, that the number to
-   * parse starts with a + symbol so that we can attempt to infer the country from the number.
+   * parse starts with a + symbol so that we can attempt to infer the region from the number.
    * Returns false if it cannot use the region provided and the region cannot be inferred.
    */
-  private boolean checkRegionForParsing(String numberToParse, String defaultCountry) {
-    if (!isValidRegionCode(defaultCountry)) {
-      // If the number is null or empty, we can't guess the country code.
+  private boolean checkRegionForParsing(String numberToParse, String defaultRegion) {
+    if (!isValidRegionCode(defaultRegion)) {
+      // If the number is null or empty, we can't infer the region.
       if (numberToParse == null || numberToParse.length() == 0 ||
           !PLUS_CHARS_PATTERN.matcher(numberToParse).lookingAt()) {
         return false;
@@ -1875,95 +2086,95 @@
 
   /**
    * Parses a string and returns it in proto buffer format. This method will throw a
-   * NumberParseException exception if the number is not considered to be a possible number. Note
-   * that validation of whether the number is actually a valid number for a particular
-   * country/region is not performed. This can be done separately with isValidNumber.
+   * {@link com.google.i18n.phonenumbers.NumberParseException} if the number is not considered to be
+   * a possible number. Note that validation of whether the number is actually a valid number for a
+   * particular region is not performed. This can be done separately with {@link #isValidNumber}.
    *
    * @param numberToParse     number that we are attempting to parse. This can contain formatting
    *                          such as +, ( and -, as well as a phone number extension.
-   * @param defaultCountry    the ISO 3166-1 two-letter country code that denotes the
-   *                          country that we are expecting the number to be from. This is only used
-   *                          if the number being parsed is not written in international format.
-   *                          The country code for the number in this case would be stored as that
-   *                          of the default country supplied. If the number is guaranteed to
-   *                          start with a '+' followed by the country code, then "ZZ" or
+   * @param defaultRegion     the ISO 3166-1 two-letter region code that denotes the region that we
+   *                          are expecting the number to be from. This is only used if the number
+   *                          being parsed is not written in international format.
+   *                          The country_code for the number in this case would be stored as that
+   *                          of the default region supplied. If the number is guaranteed to
+   *                          start with a '+' followed by the country calling code, then "ZZ" or
    *                          null can be supplied.
    * @return                  a phone number proto buffer filled with the parsed number
    * @throws NumberParseException  if the string is not considered to be a viable phone number or if
-   *                               no default country was supplied and the number is not in
+   *                               no default region was supplied and the number is not in
    *                               international format (does not start with +)
    */
-  public PhoneNumber parse(String numberToParse, String defaultCountry)
+  public PhoneNumber parse(String numberToParse, String defaultRegion)
       throws NumberParseException {
     PhoneNumber phoneNumber = new PhoneNumber();
-    parse(numberToParse, defaultCountry, phoneNumber);
+    parse(numberToParse, defaultRegion, phoneNumber);
     return phoneNumber;
   }
 
   // Same as parse(String, String), but accepts mutable PhoneNumber as a parameter to
   // decrease object creation when invoked many times.
-  public void parse(String numberToParse, String defaultCountry, PhoneNumber phoneNumber)
+  public void parse(String numberToParse, String defaultRegion, PhoneNumber phoneNumber)
       throws NumberParseException {
-    parseHelper(numberToParse, defaultCountry, false, true, phoneNumber);
+    parseHelper(numberToParse, defaultRegion, false, true, phoneNumber);
   }
 
   /**
-   * Parses a string and returns it in proto buffer format. This method differs from parse() in that
-   * it always populates the raw_input field of the protocol buffer with numberToParse as well as
-   * the country_code_source field.
+   * Parses a string and returns it in proto buffer format. This method differs from {@link #parse}
+   * in that it always populates the raw_input field of the protocol buffer with numberToParse as
+   * well as the country_code_source field.
    *
    * @param numberToParse     number that we are attempting to parse. This can contain formatting
    *                          such as +, ( and -, as well as a phone number extension.
-   * @param defaultCountry    the ISO 3166-1 two-letter country code that denotes the country that
+   * @param defaultRegion     the ISO 3166-1 two-letter region code that denotes the region that
    *                          we are expecting the number to be from. This is only used if the
    *                          number being parsed is not written in international format. The
-   *                          country code for the number in this case would be stored as that of
-   *                          the default country supplied.
+   *                          country calling code for the number in this case would be stored as
+   *                          that of the default region supplied.
    * @return                  a phone number proto buffer filled with the parsed number
    * @throws NumberParseException  if the string is not considered to be a viable phone number or if
-   *                               no default country was supplied
+   *                               no default region was supplied
    */
-  public PhoneNumber parseAndKeepRawInput(String numberToParse, String defaultCountry)
+  public PhoneNumber parseAndKeepRawInput(String numberToParse, String defaultRegion)
       throws NumberParseException {
     PhoneNumber phoneNumber = new PhoneNumber();
-    parseAndKeepRawInput(numberToParse, defaultCountry, phoneNumber);
+    parseAndKeepRawInput(numberToParse, defaultRegion, phoneNumber);
     return phoneNumber;
   }
 
   // Same as parseAndKeepRawInput(String, String), but accepts mutable PhoneNumber as a parameter to
   // decrease object creation when invoked many times.
-  public void parseAndKeepRawInput(String numberToParse, String defaultCountry,
+  public void parseAndKeepRawInput(String numberToParse, String defaultRegion,
                                    PhoneNumber phoneNumber)
       throws NumberParseException {
-    parseHelper(numberToParse, defaultCountry, true, true, phoneNumber);
+    parseHelper(numberToParse, defaultRegion, true, true, phoneNumber);
   }
 
   /**
    * Returns an iterable over all {@link PhoneNumberMatch PhoneNumberMatches} in {@code text}. This
    * is a shortcut for {@link #findNumbers(CharSequence, String, Leniency, long)
-   * getMatcher(text, defaultCountry, Leniency.VALID, Long.MAX_VALUE)}.
+   * getMatcher(text, defaultRegion, Leniency.VALID, Long.MAX_VALUE)}.
    *
    * @param text              the text to search for phone numbers, null for no text
-   * @param defaultCountry    the ISO 3166-1 two-letter country code that denotes the country that
+   * @param defaultRegion     the ISO 3166-1 two-letter region code that denotes the region that
    *                          we are expecting the number to be from. This is only used if the
    *                          number being parsed is not written in international format. The
-   *                          country code for the number in this case would be stored as that of
-   *                          the default country supplied. May be null if only international
+   *                          country calling code for the number in this case would be stored as
+   *                          that of the default region supplied. May be null if only international
    *                          numbers are expected.
    */
-  public Iterable<PhoneNumberMatch> findNumbers(CharSequence text, String defaultCountry) {
-    return findNumbers(text, defaultCountry, Leniency.VALID, Long.MAX_VALUE);
+  public Iterable<PhoneNumberMatch> findNumbers(CharSequence text, String defaultRegion) {
+    return findNumbers(text, defaultRegion, Leniency.VALID, Long.MAX_VALUE);
   }
 
   /**
    * Returns an iterable over all {@link PhoneNumberMatch PhoneNumberMatches} in {@code text}.
    *
    * @param text              the text to search for phone numbers, null for no text
-   * @param defaultCountry    the ISO 3166-1 two-letter country code that denotes the country that
+   * @param defaultRegion    the ISO 3166-1 two-letter region code that denotes the region that
    *                          we are expecting the number to be from. This is only used if the
    *                          number being parsed is not written in international format. The
-   *                          country code for the number in this case would be stored as that of
-   *                          the default country supplied. May be null if only international
+   *                          country calling code for the number in this case would be stored as
+   *                          that of the default region supplied. May be null if only international
    *                          numbers are expected.
    * @param leniency          the leniency to use when evaluating candidate phone numbers
    * @param maxTries          the maximum number of invalid numbers to try before giving up on the
@@ -1971,24 +2182,24 @@
    *                          false positives in it. Must be {@code >= 0}.
    */
   public Iterable<PhoneNumberMatch> findNumbers(
-      final CharSequence text, final String defaultCountry, final Leniency leniency,
+      final CharSequence text, final String defaultRegion, final Leniency leniency,
       final long maxTries) {
 
     return new Iterable<PhoneNumberMatch>() {
       public Iterator<PhoneNumberMatch> iterator() {
         return new PhoneNumberMatcher(
-            PhoneNumberUtil.this, text, defaultCountry, leniency, maxTries);
+            PhoneNumberUtil.this, text, defaultRegion, leniency, maxTries);
       }
     };
   }
 
   /**
    * Parses a string and fills up the phoneNumber. This method is the same as the public
-   * parse() method, with the exception that it allows the default country to be null, for use by
-   * isNumberMatch(). checkRegion should be set to false if it is permitted for the default country
+   * parse() method, with the exception that it allows the default region to be null, for use by
+   * isNumberMatch(). checkRegion should be set to false if it is permitted for the default region
    * to be null or unknown ("ZZ").
    */
-  private void parseHelper(String numberToParse, String defaultCountry, boolean keepRawInput,
+  private void parseHelper(String numberToParse, String defaultRegion, boolean keepRawInput,
                            boolean checkRegion, PhoneNumber phoneNumber)
       throws NumberParseException {
     if (numberToParse == null) {
@@ -2003,42 +2214,42 @@
                                      "The string supplied did not seem to be a phone number.");
     }
 
-    // Check the country supplied is valid, or that the extracted number starts with some sort of +
+    // Check the region supplied is valid, or that the extracted number starts with some sort of +
     // sign so the number's region can be determined.
-    if (checkRegion && !checkRegionForParsing(number, defaultCountry)) {
+    if (checkRegion && !checkRegionForParsing(number, defaultRegion)) {
       throw new NumberParseException(NumberParseException.ErrorType.INVALID_COUNTRY_CODE,
-                                     "Missing or invalid default country.");
+                                     "Missing or invalid default region.");
     }
 
     if (keepRawInput) {
       phoneNumber.setRawInput(numberToParse);
     }
-    StringBuffer nationalNumber = new StringBuffer(number);
-    // Attempt to parse extension first, since it doesn't require country-specific data and we want
+    StringBuilder nationalNumber = new StringBuilder(number);
+    // Attempt to parse extension first, since it doesn't require region-specific data and we want
     // to have the non-normalised number here.
     String extension = maybeStripExtension(nationalNumber);
     if (extension.length() > 0) {
       phoneNumber.setExtension(extension);
     }
 
-    PhoneMetadata countryMetadata = getMetadataForRegion(defaultCountry);
+    PhoneMetadata regionMetadata = getMetadataForRegion(defaultRegion);
     // Check to see if the number is given in international format so we know whether this number is
-    // from the default country or not.
-    StringBuffer normalizedNationalNumber = new StringBuffer();
-    int countryCode = maybeExtractCountryCode(nationalNumber.toString(), countryMetadata,
+    // from the default region or not.
+    StringBuilder normalizedNationalNumber = new StringBuilder();
+    int countryCode = maybeExtractCountryCode(nationalNumber.toString(), regionMetadata,
                                               normalizedNationalNumber, keepRawInput, phoneNumber);
     if (countryCode != 0) {
       String phoneNumberRegion = getRegionCodeForCountryCode(countryCode);
-      if (!phoneNumberRegion.equals(defaultCountry)) {
-        countryMetadata = getMetadataForRegion(phoneNumberRegion);
+      if (!phoneNumberRegion.equals(defaultRegion)) {
+        regionMetadata = getMetadataForRegion(phoneNumberRegion);
       }
     } else {
-      // If no extracted country code, use the region supplied instead. The national number is just
-      // the normalized version of the number we were given to parse.
+      // If no extracted country calling code, use the region supplied instead. The national number
+      // is just the normalized version of the number we were given to parse.
       normalize(nationalNumber);
       normalizedNationalNumber.append(nationalNumber);
-      if (defaultCountry != null) {
-        countryCode = countryMetadata.getCountryCode();
+      if (defaultRegion != null) {
+        countryCode = regionMetadata.getCountryCode();
         phoneNumber.setCountryCode(countryCode);
       } else if (keepRawInput) {
         phoneNumber.clearCountryCodeSource();
@@ -2048,9 +2259,9 @@
       throw new NumberParseException(NumberParseException.ErrorType.TOO_SHORT_NSN,
                                      "The string supplied is too short to be a phone number.");
     }
-    if (countryMetadata != null) {
+    if (regionMetadata != null) {
       String carrierCode =
-          maybeStripNationalPrefixAndCarrierCode(normalizedNationalNumber, countryMetadata);
+          maybeStripNationalPrefixAndCarrierCode(normalizedNationalNumber, regionMetadata);
       if (keepRawInput) {
         phoneNumber.setPreferredDomesticCarrierCode(carrierCode);
       }
@@ -2065,7 +2276,8 @@
                                      "The string supplied is too long to be a phone number.");
     }
     if (normalizedNationalNumber.charAt(0) == '0' &&
-        isLeadingZeroCountry(countryCode)) {
+        regionMetadata != null &&
+        regionMetadata.isLeadingZeroPossible()) {
       phoneNumber.setItalianLeadingZero(true);
     }
     phoneNumber.setNationalNumber(Long.parseLong(normalizedNationalNumber.toString()));
@@ -2074,12 +2286,12 @@
   /**
    * Takes two phone numbers and compares them for equality.
    *
-   * Returns EXACT_MATCH if the country code, NSN, presence of a leading zero for Italian numbers
+   * <p>Returns EXACT_MATCH if the country_code, NSN, presence of a leading zero for Italian numbers
    * and any extension present are the same.
-   * Returns NSN_MATCH if either or both has no country specified, and the NSNs and extensions are
+   * Returns NSN_MATCH if either or both has no region specified, and the NSNs and extensions are
    * the same.
-   * Returns SHORT_NSN_MATCH if either or both has no country specified, or the country specified
-   * is the same, and one NSN could be a shorter version of the other number. This includes the case
+   * Returns SHORT_NSN_MATCH if either or both has no region specified, or the region specified is
+   * the same, and one NSN could be a shorter version of the other number. This includes the case
    * where one has an extension specified, and the other does not.
    * Returns NO_MATCH otherwise.
    * For example, the numbers +1 345 657 1234 and 657 1234 are a SHORT_NSN_MATCH.
@@ -2120,7 +2332,7 @@
     }
     int firstNumberCountryCode = firstNumber.getCountryCode();
     int secondNumberCountryCode = secondNumber.getCountryCode();
-    // Both had country code specified.
+    // Both had country_code specified.
     if (firstNumberCountryCode != 0 && secondNumberCountryCode != 0) {
       if (firstNumber.exactlySameAs(secondNumber)) {
         return MatchType.EXACT_MATCH;
@@ -2134,8 +2346,8 @@
       // This is not a match.
       return MatchType.NO_MATCH;
     }
-    // Checks cases where one or both country codes were not specified. To make equality checks
-    // easier, we first set the country codes to be equal.
+    // Checks cases where one or both country_code fields were not specified. To make equality
+    // checks easier, we first set the country_code fields to be equal.
     firstNumber.setCountryCode(secondNumberCountryCode);
     // If all else was the same, then this is an NSN_MATCH.
     if (firstNumber.exactlySameAs(secondNumber)) {
@@ -2159,13 +2371,12 @@
 
   /**
    * Takes two phone numbers as strings and compares them for equality. This is a convenience
-   * wrapper for isNumberMatch(PhoneNumber firstNumber, PhoneNumber secondNumber). No default region
-   * is known.
+   * wrapper for {@link #isNumberMatch(PhoneNumber, PhoneNumber)}. No default region is known.
    *
-   * @param firstNumber  first number to compare. Can contain formatting, and can have country code
-   *     specified with + at the start.
+   * @param firstNumber  first number to compare. Can contain formatting, and can have country
+   *     calling code specified with + at the start.
    * @param secondNumber  second number to compare. Can contain formatting, and can have country
-   *     code specified with + at the start.
+   *     calling code specified with + at the start.
    * @return  NOT_A_NUMBER, NO_MATCH, SHORT_NSN_MATCH, NSN_MATCH, EXACT_MATCH. See
    *     isNumberMatch(PhoneNumber firstNumber, PhoneNumber secondNumber) for more details.
    */
@@ -2203,18 +2414,19 @@
    *
    * @param firstNumber  first number to compare in proto buffer format.
    * @param secondNumber  second number to compare. Can contain formatting, and can have country
-   *     code specified with + at the start.
+   *     calling code specified with + at the start.
    * @return  NOT_A_NUMBER, NO_MATCH, SHORT_NSN_MATCH, NSN_MATCH, EXACT_MATCH. See
    *     isNumberMatch(PhoneNumber firstNumber, PhoneNumber secondNumber) for more details.
    */
   public MatchType isNumberMatch(PhoneNumber firstNumber, String secondNumber) {
-    // First see if the second number has an implicit country code, by attempting to parse it.
+    // First see if the second number has an implicit country calling code, by attempting to parse
+    // it.
     try {
       PhoneNumber secondNumberAsProto = parse(secondNumber, UNKNOWN_REGION);
       return isNumberMatch(firstNumber, secondNumberAsProto);
     } catch (NumberParseException e) {
       if (e.getErrorType() == NumberParseException.ErrorType.INVALID_COUNTRY_CODE) {
-        // The second number has no country code. EXACT_MATCH is no longer possible.
+        // The second number has no country calling code. EXACT_MATCH is no longer possible.
         // We parse it as if the region was the same as that for the first number, and if
         // EXACT_MATCH is returned, we replace this with NSN_MATCH.
         String firstNumberRegion = getRegionCodeForCountryCode(firstNumber.getCountryCode());
@@ -2227,8 +2439,8 @@
             }
             return match;
           } else {
-            // If the first number didn't have a valid country code, then we parse the second number
-            // without one as well.
+            // If the first number didn't have a valid country calling code, then we parse the
+            // second number without one as well.
             PhoneNumber secondNumberProto = new PhoneNumber();
             parseHelper(secondNumber, null, false, false, secondNumberProto);
             return isNumberMatch(firstNumber, secondNumberProto);
@@ -2243,14 +2455,14 @@
   }
 
   /**
-   * Returns true if the number can only be dialled from within the country. If unknown, or the
-   * number can be dialled from outside the country as well, returns false. Does not check the
+   * Returns true if the number can only be dialled from within the region. If unknown, or the
+   * number can be dialled from outside the region as well, returns false. Does not check the
    * number is a valid number.
    * TODO: Make this method public when we have enough metadata to make it worthwhile. Currently
    * visible for testing purposes only.
    *
    * @param number  the phone-number for which we want to know whether it is only diallable from
-   *     within the country
+   *     within the region
    */
   boolean canBeInternationallyDialled(PhoneNumber number) {
     String regionCode = getRegionCodeForNumber(number);
diff --git a/java/src/com/google/i18n/phonenumbers/Phonemetadata.java b/java/src/com/google/i18n/phonenumbers/Phonemetadata.java
index 98dd52f..de9f7c0 100644
--- a/java/src/com/google/i18n/phonenumbers/Phonemetadata.java
+++ b/java/src/com/google/i18n/phonenumbers/Phonemetadata.java
@@ -29,10 +29,24 @@
 
 public final class Phonemetadata {
   private Phonemetadata() {}
-  public static final class NumberFormat implements Externalizable {
+  public static class NumberFormat implements Externalizable {
     private static final long serialVersionUID = 1;
     public NumberFormat() {}
 
+    /**
+     * Provides a dummy builder to 'emulate' the API of the code generated by the latest version of
+     * Protocol Buffers. This lets BuildMetadataFromXml class to build with both this hand created
+     * class and the one generated by the latest version of Protocol Buffers.
+     */
+    public static final class Builder extends NumberFormat {
+      public NumberFormat build() {
+        return this;
+      }
+    }
+    public static Builder newBuilder() {
+      return new Builder();
+    }
+
     // required string pattern = 1;
     private boolean hasPattern;
     private String pattern_ = "";
@@ -57,10 +71,10 @@
 
     // repeated string leading_digits_pattern = 3;
     private java.util.List<String> leadingDigitsPattern_ = new java.util.ArrayList<String>();
-    public java.util.List<String> getLeadingDigitsPatternList() {
+    public java.util.List<String> leadingDigitPatterns() {
       return leadingDigitsPattern_;
     }
-    public int getLeadingDigitsPatternCount() { return leadingDigitsPattern_.size(); }
+    public int leadingDigitsPatternSize() { return leadingDigitsPattern_.size(); }
     public String getLeadingDigitsPattern(int index) {
       return leadingDigitsPattern_.get(index);
     }
@@ -108,7 +122,7 @@
       if (other.hasFormat()) {
         setFormat(other.getFormat());
       }
-      int leadingDigitsPatternSize = other.getLeadingDigitsPatternCount();
+      int leadingDigitsPatternSize = other.leadingDigitsPatternSize();
       for (int i = 0; i < leadingDigitsPatternSize; i++) {
         addLeadingDigitsPattern(other.getLeadingDigitsPattern(i));
       }
@@ -124,7 +138,7 @@
     public void writeExternal(ObjectOutput objectOutput) throws IOException {
       objectOutput.writeUTF(pattern_);
       objectOutput.writeUTF(format_);
-      int leadingDigitsPatternSize = getLeadingDigitsPatternCount();
+      int leadingDigitsPatternSize = leadingDigitsPatternSize();
       objectOutput.writeInt(leadingDigitsPatternSize);
       for (int i = 0; i < leadingDigitsPatternSize; i++) {
         objectOutput.writeUTF(leadingDigitsPattern_.get(i));
@@ -156,10 +170,24 @@
     }
   }
 
-  public static final class PhoneNumberDesc implements Externalizable {
+  public static class PhoneNumberDesc implements Externalizable {
     private static final long serialVersionUID = 1;
     public PhoneNumberDesc() {}
 
+    /**
+     * Provides a dummy builder.
+     *
+     * @see NumberFormat.Builder
+     */
+    public static final class Builder extends PhoneNumberDesc {
+      public PhoneNumberDesc build() {
+        return this;
+      }
+    }
+    public static Builder newBuilder() {
+      return new Builder();
+    }
+
     // optional string national_number_pattern = 2;
     private boolean hasNationalNumberPattern;
     private String nationalNumberPattern_ = "";
@@ -244,10 +272,24 @@
     }
   }
 
-  public static final class PhoneMetadata implements Externalizable {
+  public static class PhoneMetadata implements Externalizable {
     private static final long serialVersionUID = 1;
     public PhoneMetadata() {}
 
+    /**
+     * Provides a dummy builder.
+     *
+     * @see NumberFormat.Builder
+     */
+    public static final class Builder extends PhoneMetadata {
+      public PhoneMetadata build() {
+        return this;
+      }
+    }
+    public static Builder newBuilder() {
+      return new Builder();
+    }
+
     // required PhoneNumberDesc general_desc = 1;
     private boolean hasGeneralDesc;
     private PhoneNumberDesc generalDesc_ = null;
@@ -503,10 +545,10 @@
 
     // repeated NumberFormat number_format = 19;
     private java.util.List<NumberFormat> numberFormat_ = new java.util.ArrayList<NumberFormat>();
-    public java.util.List<NumberFormat> getNumberFormatList() {
+    public java.util.List<NumberFormat> numberFormats() {
       return numberFormat_;
     }
-    public int getNumberFormatCount() { return numberFormat_.size(); }
+    public int numberFormatSize() { return numberFormat_.size(); }
     public NumberFormat getNumberFormat(int index) {
       return numberFormat_.get(index);
     }
@@ -521,10 +563,10 @@
     // repeated NumberFormat intl_number_format = 20;
     private java.util.List<NumberFormat> intlNumberFormat_ =
         new java.util.ArrayList<NumberFormat>();
-    public java.util.List<NumberFormat> getIntlNumberFormatList() {
+    public java.util.List<NumberFormat> intlNumberFormats() {
       return intlNumberFormat_;
     }
-    public int getIntlNumberFormatCount() { return intlNumberFormat_.size(); }
+    public int intlNumberFormatSize() { return intlNumberFormat_.size(); }
     public NumberFormat getIntlNumberFormat(int index) {
       return intlNumberFormat_.get(index);
     }
@@ -536,12 +578,16 @@
       intlNumberFormat_.add(value);
       return this;
     }
+    public PhoneMetadata clearIntlNumberFormat() {
+      intlNumberFormat_.clear();
+      return this;
+    }
 
     // optional bool main_country_for_code = 22 [default = false];
     private boolean hasMainCountryForCode;
     private boolean mainCountryForCode_ = false;
     public boolean hasMainCountryForCode() { return hasMainCountryForCode; }
-    public boolean getMainCountryForCode() { return mainCountryForCode_; }
+    public boolean isMainCountryForCode() { return mainCountryForCode_; }
     public PhoneMetadata setMainCountryForCode(boolean value) {
       hasMainCountryForCode = true;
       mainCountryForCode_ = value;
@@ -559,6 +605,17 @@
       return this;
     }
 
+    // optional bool leading_zero_possible = 26 [default = false];
+    private boolean hasLeadingZeroPossible;
+    private boolean leadingZeroPossible_ = false;
+    public boolean hasLeadingZeroPossible() { return hasLeadingZeroPossible; }
+    public boolean isLeadingZeroPossible() { return leadingZeroPossible_; }
+    public PhoneMetadata setLeadingZeroPossible(boolean value) {
+      hasLeadingZeroPossible = true;
+      leadingZeroPossible_ = value;
+      return this;
+    }
+
     public void writeExternal(ObjectOutput objectOutput) throws IOException {
       objectOutput.writeBoolean(hasGeneralDesc);
       if (hasGeneralDesc) {
@@ -636,13 +693,13 @@
 
       objectOutput.writeBoolean(sameMobileAndFixedLinePattern_);
 
-      int numberFormatSize = getNumberFormatCount();
+      int numberFormatSize = numberFormatSize();
       objectOutput.writeInt(numberFormatSize);
       for (int i = 0; i < numberFormatSize; i++) {
         numberFormat_.get(i).writeExternal(objectOutput);
       }
 
-      int intlNumberFormatSize = getIntlNumberFormatCount();
+      int intlNumberFormatSize = intlNumberFormatSize();
       objectOutput.writeInt(intlNumberFormatSize);
       for (int i = 0; i < intlNumberFormatSize; i++) {
         intlNumberFormat_.get(i).writeExternal(objectOutput);
@@ -654,6 +711,8 @@
       if (hasLeadingDigits) {
         objectOutput.writeUTF(leadingDigits_);
       }
+
+      objectOutput.writeBoolean(leadingZeroPossible_);
     }
 
     public void readExternal(ObjectInput objectInput) throws IOException {
@@ -775,13 +834,29 @@
       if (hasString) {
         setLeadingDigits(objectInput.readUTF());
       }
+
+      setLeadingZeroPossible(objectInput.readBoolean());
     }
   }
 
-  public static final class PhoneMetadataCollection implements Externalizable {
+  public static class PhoneMetadataCollection implements Externalizable {
     private static final long serialVersionUID = 1;
     public PhoneMetadataCollection() {}
 
+    /**
+     * Provides a dummy builder.
+     *
+     * @see NumberFormat.Builder
+     */
+    public static final class Builder extends PhoneMetadataCollection {
+      public PhoneMetadataCollection build() {
+        return this;
+      }
+    }
+    public static Builder newBuilder() {
+      return new Builder();
+    }
+
     // repeated PhoneMetadata metadata = 1;
     private java.util.List<PhoneMetadata> metadata_ = new java.util.ArrayList<PhoneMetadata>();
 
diff --git a/java/src/com/google/i18n/phonenumbers/Phonenumber.java b/java/src/com/google/i18n/phonenumbers/Phonenumber.java
index 89382a1..3f7d23e 100644
--- a/java/src/com/google/i18n/phonenumbers/Phonenumber.java
+++ b/java/src/com/google/i18n/phonenumbers/Phonenumber.java
@@ -22,9 +22,12 @@
 
 package com.google.i18n.phonenumbers;
 
+import java.io.Serializable;
+
 public final class Phonenumber {
   private Phonenumber() {}
-  public static class PhoneNumber {
+  public static class PhoneNumber implements Serializable {
+    private static final long serialVersionUID = 1L;
     public enum CountryCodeSource {
       FROM_NUMBER_WITH_PLUS_SIGN,
       FROM_NUMBER_WITH_IDD,
@@ -235,7 +238,7 @@
 
     @Override
     public String toString() {
-      StringBuffer outputString = new StringBuffer();
+      StringBuilder outputString = new StringBuilder();
       outputString.append("Country Code: ").append(countryCode_);
       outputString.append(" National Number: ").append(nationalNumber_);
       if (hasItalianLeadingZero() && getItalianLeadingZero()) {
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AC b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AC
index 5bf4289..d0069f1 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AC
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AC
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AD b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AD
index 62b3b29..2f5199b 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AD
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AD
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AE
index cce7540..2f543e1 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AF b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AF
index 6922340..0120a23 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AF
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AF
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG
index f0b7c4f..ce1d508 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AI b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AI
index 403d693..2bdd9da 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AI
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AI
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AL b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AL
index 560b677..15cbd77 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AL
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AL
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM
index e1488b3..7d0f2a2 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AN
index 73a83e8..e2aa056 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AO
index 304cb0a..13a5285 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR
index 44a3b68..007ab2e 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AS b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AS
index 8728b28..76f517c 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AS
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AS
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AT b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AT
index f2b645c..720010c 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AT
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AT
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU
index 0fa61dd..b34fb0a 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AW b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AW
index 1c7842e..5e69468 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AW
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AW
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AX b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AX
new file mode 100644
index 0000000..8abd003
--- /dev/null
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AX
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AZ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AZ
index ca83c98..0581301 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AZ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AZ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BA
index 3c9e268..c5e36f6 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BB b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BB
index 0b60e57..553a1de 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BB
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BB
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD
index 872fc63..f335c39 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BE
index b0074bf..fa90f75 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF
index cd1431f..63d7e64 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BG
index ed3913d..e1e34d9 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BH b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BH
index a7b67c4..3589ec9 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BH
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BH
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BI b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BI
index 40ecfcb..2b67b00 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BI
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BI
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BJ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BJ
index 1fb8318..e5ef1ec 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BJ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BJ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BL b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BL
index de4b804..b410d02 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BL
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BL
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BM
index f51c6f7..c50e099 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BN
index 0fe3d38..46b0177 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BO
index 0395299..8e8857c 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR
index 67fe311..9aa4d28 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS
index e72eaac..23bbf75 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BT b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BT
index c04cc47..139f181 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BT
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BT
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BW b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BW
index 752f852..641043d 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BW
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BW
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY
index 91b8207..969f182 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ
index ec98a81..3e4f371 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA
index 08a19c1..5d9bfb2 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CC b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CC
new file mode 100644
index 0000000..948af63
--- /dev/null
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CC
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD
index 029f0e9..4456d29 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CF b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CF
index 440ee17..eeb5eeb 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CF
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CF
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CG
index dfc82a1..6b809d4 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CH b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CH
index b9781b3..1b520c3 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CH
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CH
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI
index c647c3d..dadad8e 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CK b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CK
index 2ce83c2..ce2a8ec 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CK
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CK
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL
index 2e9c0d8..8fabf74 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CM
index 414c1dd..5fb3c1f 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN
index aeb8224..c80a254 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CO
index e89645a..49ff901 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR
index 979fa17..2a047bf 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CU b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CU
index 58728b9..3d2e499 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CU
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CU
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CV b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CV
index 40f6819..947e660 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CV
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CV
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CX b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CX
new file mode 100644
index 0000000..585d96a
--- /dev/null
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CX
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CY b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CY
index 6e910fa..fb374ed 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CY
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CY
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ
index 8e4bc85..43ec39e 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE
index 657ff37..87844f3 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ
index 195b880..2978ffe 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DK b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DK
index 2b9a712..cbb0f4c 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DK
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DK
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DM
index 2f46834..8713673 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DO
index 0100b93..c48d82c 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DZ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DZ
index 9551e58..c3d52a0 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DZ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DZ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EC b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EC
index 5078020..6578ddd 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EC
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EC
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EE
index 45242fe..8387a3b 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG
index 1b383cb..e3a1c56 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ER b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ER
index 7207396..5c25636 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ER
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ER
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES
index 81c67e2..2ae03c9 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ET b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ET
index 6c1a588..6aacbc5 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ET
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ET
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FI b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FI
index 925e740..bd871b6 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FI
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FI
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FJ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FJ
index dfc6432..d123c00 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FJ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FJ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FK b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FK
index 9630d47..47e774d 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FK
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FK
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FM
index f3f3699..678e85d 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FO
index 2d2ff18..f6641dd 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR
index 2b16dea..7a2adfd 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GA
index f923cae..800c4f2 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB
index 9f4e327..d1ae758 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GD b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GD
index f2e6c56..ef111dd 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GD
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GD
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GE
index 22f3da2..b385664 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GF b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GF
index e82b26c..b84bf20 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GF
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GF
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG
index ae3cec7..7d24686 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH
index 82ff8e4..64e2f87 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GI b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GI
index 63a685f..6625331 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GI
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GI
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GL b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GL
index f8dc2b0..f50ade6 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GL
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GL
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GM
index 27ce34f..abef42b 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN
index dde6c53..c865a17 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GP b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GP
index f6108ee..fdce952 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GP
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GP
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GQ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GQ
index c3bd13e..2444a74 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GQ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GQ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GR
index ed28df8..2c4a828 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GT b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GT
index b91516c..2f9f995 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GT
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GT
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GU b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GU
index 237d37a..7cd7701 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GU
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GU
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW
index a755f36..9ca2299 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY
index 10f48a7..1636ed4 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK
index 01b773d..89a9cff 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN
index 502c311..8aa3857 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HR
index 3089e8b..9766d56 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HT b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HT
index 11abb56..6d4d7b7 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HT
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HT
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HU b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HU
index 90009c0..79efc3c 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HU
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HU
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID
index 0c2803e..c2d6738 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IE
index 706aedd..bd1e9ed 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL
index d39b391..f784b0f 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM
index 30bb20e..ab78e3a 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN
index 60dd9da..8354c60 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IO
index f15346f..7731fb8 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IQ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IQ
index ab713bb..475492f 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IQ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IQ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR
index 35827c0..a5b3394 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IS b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IS
index 233e357..eb45cb4 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IS
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IS
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IT b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IT
index 8c81e18..ae03581 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IT
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IT
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE
index 2e3c4d5..37dc706 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JM
index 77c4efc..dce03a8 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JO
index 6c8e265..cc0d091 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP
index 9650864..b3246cc 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KE
index bfd69a4..4c35cb2 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KG
index 06d1f7d..c4e37cf 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KH b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KH
index 0ddca18..3b43e39 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KH
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KH
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI
index 377f39b..1b754cc 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM
index a2d3de6..b691649 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KN
index 863b3eb..9045dfb 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KP b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KP
index eccdf9e..aa771a1 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KP
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KP
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR
index e66f157..f74cb4d 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW
index 7ab6e36..475d794 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KY b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KY
index 754551b..5bfc93e 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KY
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KY
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ
index b0b73df..bf98d95 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LA
index 984aeba..7f78cb8 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB
index ab97154..faf8a72 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LC b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LC
index 296fe41..3239dd6 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LC
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LC
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI
index 37693c5..e792149 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LK b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LK
index 4092102..2b06a38 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LK
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LK
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR
index c5cfee6..dd7306b 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LS b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LS
index ca98900..e65316e 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LS
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LS
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LT b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LT
index 43b750c..02ad948 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LT
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LT
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LU b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LU
index 1b31374..ef5e720 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LU
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LU
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LV b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LV
index 631d6f2..80c3aa3 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LV
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LV
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LY b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LY
index 6fb9f25..a3c6000 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LY
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LY
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA
index bf69698..dd0beb5 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC
index 61e560f..1a80b90 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MD b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MD
index edc5d0f..0763f61 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MD
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MD
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME
index 056305b..352802e 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MF b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MF
index 29c214b..2daec61 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MF
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MF
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MG
index b0c8bf2..7eef113 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MH b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MH
index 131f198..2df3a70 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MH
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MH
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MK b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MK
index 9b94a61..040a791 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MK
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MK
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ML b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ML
index d1efd0f..c7d6d18 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ML
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ML
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM
index 8c35059..fbe65bc 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MN
index 0d76175..b96b7f9 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MO
index a72a4bc..d0bb6ae 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MP b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MP
index 312659b..ca8b834 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MP
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MP
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ
index 6a495d7..889f649 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MR
index fd21ea7..d4e34bc 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MS b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MS
index c1ad3b3..c6d5fe5 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MS
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MS
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MT b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MT
index 9dcbbbf..e4ef74a 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MT
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MT
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU
index a65c8e3..cde515f 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MV b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MV
index 49e9b28..7e2e0b3 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MV
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MV
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MW b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MW
index 4529ee1..36fe6c9 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MW
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MW
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MX b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MX
index c857d1d..dc44efb 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MX
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MX
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MY b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MY
index 47e64ec..35b8414 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MY
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MY
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ
index 6ae79b9..5128f4e 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA
index 046be15..5c54aa0 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NC b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NC
index a6ce4d0..cfa92c5 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NC
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NC
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NE
index 05e12c3..62309e5 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NF b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NF
index e4ef5e8..59991ff 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NF
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NF
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG
index 09939ff..4e12b36 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NI b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NI
index 5eb33fe..95e956a 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NI
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NI
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NL b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NL
index 79c8741..f0a7b30 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NL
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NL
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NO
index de77f88..cf7b46e 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NP b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NP
index 74caa04..e54df79 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NP
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NP
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NR
index 72e46b3..65dd064 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NU b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NU
index d33aa7a..ac5a701 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NU
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NU
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ
index 20dc762..199e3c2 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_OM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_OM
index aa0e794..a3ce6c1 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_OM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_OM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PA
index c8c2c76..ad660fc 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PE
index 45de89d..c0c26bf 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PF b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PF
index 30924a4..cd67c8b 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PF
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PF
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG
index 067b499..767f47c 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PH b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PH
index 5810c29..cf6ad8d 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PH
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PH
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PK b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PK
index a7a82f7..6b0027d 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PK
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PK
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PL b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PL
index 2d51c34..012f5b7 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PL
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PL
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PM
index e645cd2..0041418 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PR
index 335b318..ed7165b 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PS b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PS
index 21b9986..1114659 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PS
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PS
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PT b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PT
index bb7270f..9c691cc 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PT
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PT
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PW b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PW
index d65d876..f51d0d1 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PW
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PW
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PY b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PY
index 0735436..628bd87 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PY
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PY
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_QA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_QA
index 4717ebd..da69ee2 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_QA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_QA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE
index fa0ccb4..0a282a4 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO
index 595878e..d45708a 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RS b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RS
index cc359b1..6f97714 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RS
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RS
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RU b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RU
index 9589b84..189e57f 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RU
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RU
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RW b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RW
index 63319ce..9b1ce03 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RW
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RW
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SA
index ec5abcc..a938bbf 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SB b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SB
index 464b8ec..5524740 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SB
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SB
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC
index 3d74da0..ff47679 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SD b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SD
index 34968f0..37871a1 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SD
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SD
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SE
index fb42a83..9d94908 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SG
index 9071c3f..6020eb3 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SH b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SH
index c52c527..e928407 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SH
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SH
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SI b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SI
index 927774b..b9df92b 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SI
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SI
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SJ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SJ
new file mode 100644
index 0000000..aca19d3
--- /dev/null
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SJ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK
index b755b5c..50b4e3a 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SL b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SL
index c3fd293..5ab8432 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SL
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SL
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SM
index ea97ce1..176add7 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SN
index 535afa3..853bd40 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO
index 334be74..2db9450 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SR
index b563d07..a215045 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ST b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ST
index 29b7d36..9a8a7ec 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ST
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ST
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SV b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SV
index 0a299cf..695ef3f 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SV
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SV
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SY b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SY
index 9c547de..b2256b3 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SY
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SY
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SZ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SZ
index 663f11a..b487a13 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SZ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SZ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TC b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TC
index 8034cbd..0db9395 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TC
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TC
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TD b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TD
index cfde8b7..dc573d1 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TD
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TD
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TF b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TF
index d18541d..8e7ef30 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TF
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TF
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG
index d6b9654..523c84b 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TH b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TH
index e7f2c33..119af7d 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TH
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TH
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ
index 5a3fd6f..a49e8a8 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TK b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TK
index 653d606..87012f4 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TK
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TK
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TL b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TL
index 8b4378c..3e96e18 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TL
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TL
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TM
index c3c8de1..b3b4ad8 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TN
index b9ffbfd..b4c0747 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TO b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TO
index 4497b3f..256eebf 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TO
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TO
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TR b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TR
index 0d20cbb..df54d35 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TR
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TR
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT
index bdbaf96..2330233 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TV b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TV
index 8cf631d..973582a 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TV
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TV
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TW b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TW
index 63963cf..08b4172 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TW
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TW
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ
index 0f99acb..b5c29af 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA
index a5d2806..f74e132 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG
index 4eb5563..97fd6fb 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US
index 25b3668..7f80f1d 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UY b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UY
index 2a198e6..ebf41e1 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UY
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UY
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UZ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UZ
index 2a307b3..05c6854 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UZ
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UZ
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VA
index a0be427..0b7f9ee 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VC b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VC
index ab04383..5817468 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VC
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VC
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VE
index 96b653f..1db7196 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VG b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VG
index e7d7db7..17db04b 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VG
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VG
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VI b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VI
index 88428e8..3f93a89 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VI
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VI
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN
index a463207..6f2b378 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VU b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VU
index a79ddef..40c22cd 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VU
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VU
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WF b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WF
index 423e86d..f6b6c15 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WF
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WF
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WS b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WS
index 52fd0e7..9022baa 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WS
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WS
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YE b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YE
index e4e2e78..b18ec98 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YE
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YE
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YT b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YT
index 5d3b0f9..ae7df49 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YT
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YT
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA
index 19896c6..15930b3 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZM b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZM
index 99c8152..5e0253d 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZM
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZM
Binary files differ
diff --git a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW
index 13aa728..45b6bc1 100644
--- a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW
+++ b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/AsYouTypeFormatterTest.java b/java/test/com/google/i18n/phonenumbers/AsYouTypeFormatterTest.java
index 4920676..b03f6e5 100644
--- a/java/test/com/google/i18n/phonenumbers/AsYouTypeFormatterTest.java
+++ b/java/test/com/google/i18n/phonenumbers/AsYouTypeFormatterTest.java
@@ -343,7 +343,7 @@
   }
 
   public void testAYTFGBTollFree() {
-     AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter("gb");
+    AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter("gb");
     assertEquals("0", formatter.inputDigit('0'));
     assertEquals("08", formatter.inputDigit('8'));
     assertEquals("080", formatter.inputDigit('0'));
@@ -391,10 +391,10 @@
     assertEquals("0", formatter.inputDigit('0'));
     assertEquals("03", formatter.inputDigit('3'));
     assertEquals("030", formatter.inputDigit('0'));
-    assertEquals("030 1", formatter.inputDigit('1'));
-    assertEquals("030 12", formatter.inputDigit('2'));
-    assertEquals("030 123", formatter.inputDigit('3'));
-    assertEquals("030 1234", formatter.inputDigit('4'));
+    assertEquals("030/1", formatter.inputDigit('1'));
+    assertEquals("030/12", formatter.inputDigit('2'));
+    assertEquals("030/123", formatter.inputDigit('3'));
+    assertEquals("030/1234", formatter.inputDigit('4'));
 
     // 04134 1234
     formatter.clear();
@@ -460,8 +460,7 @@
     assertEquals("+54 9", formatter.inputDigit('9'));
     assertEquals("+54 91", formatter.inputDigit('1'));
     assertEquals("+54 9 11", formatter.inputDigit('1'));
-    assertEquals("+54 9 11 2",
-                 formatter.inputDigit('2'));
+    assertEquals("+54 9 11 2", formatter.inputDigit('2'));
     assertEquals("+54 9 11 23", formatter.inputDigit('3'));
     assertEquals("+54 9 11 231", formatter.inputDigit('1'));
     assertEquals("+54 9 11 2312", formatter.inputDigit('2'));
@@ -561,6 +560,91 @@
     assertEquals("011-9876-7890", formatter.inputDigit('0'));
   }
 
+  public void testAYTF_MX() {
+    AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter("MX");
+
+    // +52 800 123 4567
+    assertEquals("+", formatter.inputDigit('+'));
+    assertEquals("+5", formatter.inputDigit('5'));
+    assertEquals("+52 ", formatter.inputDigit('2'));
+    assertEquals("+52 8", formatter.inputDigit('8'));
+    assertEquals("+52 80", formatter.inputDigit('0'));
+    assertEquals("+52 800", formatter.inputDigit('0'));
+    assertEquals("+52 800 1", formatter.inputDigit('1'));
+    assertEquals("+52 800 12", formatter.inputDigit('2'));
+    assertEquals("+52 800 123", formatter.inputDigit('3'));
+    assertEquals("+52 800 123 4", formatter.inputDigit('4'));
+    assertEquals("+52 800 123 45", formatter.inputDigit('5'));
+    assertEquals("+52 800 123 456", formatter.inputDigit('6'));
+    assertEquals("+52 800 123 4567", formatter.inputDigit('7'));
+
+    // +52 55 1234 5678
+    formatter.clear();
+    assertEquals("+", formatter.inputDigit('+'));
+    assertEquals("+5", formatter.inputDigit('5'));
+    assertEquals("+52 ", formatter.inputDigit('2'));
+    assertEquals("+52 5", formatter.inputDigit('5'));
+    assertEquals("+52 55", formatter.inputDigit('5'));
+    assertEquals("+52 55 1", formatter.inputDigit('1'));
+    assertEquals("+52 55 12", formatter.inputDigit('2'));
+    assertEquals("+52 55 123", formatter.inputDigit('3'));
+    assertEquals("+52 55 1234", formatter.inputDigit('4'));
+    assertEquals("+52 55 1234 5", formatter.inputDigit('5'));
+    assertEquals("+52 55 1234 56", formatter.inputDigit('6'));
+    assertEquals("+52 55 1234 567", formatter.inputDigit('7'));
+    assertEquals("+52 55 1234 5678", formatter.inputDigit('8'));
+
+    // +52 212 345 6789
+    formatter.clear();
+    assertEquals("+", formatter.inputDigit('+'));
+    assertEquals("+5", formatter.inputDigit('5'));
+    assertEquals("+52 ", formatter.inputDigit('2'));
+    assertEquals("+52 2", formatter.inputDigit('2'));
+    assertEquals("+52 21", formatter.inputDigit('1'));
+    assertEquals("+52 212", formatter.inputDigit('2'));
+    assertEquals("+52 212 3", formatter.inputDigit('3'));
+    assertEquals("+52 212 34", formatter.inputDigit('4'));
+    assertEquals("+52 212 345", formatter.inputDigit('5'));
+    assertEquals("+52 212 345 6", formatter.inputDigit('6'));
+    assertEquals("+52 212 345 67", formatter.inputDigit('7'));
+    assertEquals("+52 212 345 678", formatter.inputDigit('8'));
+    assertEquals("+52 212 345 6789", formatter.inputDigit('9'));
+
+    // +52 1 55 1234 5678
+    formatter.clear();
+    assertEquals("+", formatter.inputDigit('+'));
+    assertEquals("+5", formatter.inputDigit('5'));
+    assertEquals("+52 ", formatter.inputDigit('2'));
+    assertEquals("+52 1", formatter.inputDigit('1'));
+    assertEquals("+52 15", formatter.inputDigit('5'));
+    assertEquals("+52 1 55", formatter.inputDigit('5'));
+    assertEquals("+52 1 55 1", formatter.inputDigit('1'));
+    assertEquals("+52 1 55 12", formatter.inputDigit('2'));
+    assertEquals("+52 1 55 123", formatter.inputDigit('3'));
+    assertEquals("+52 1 55 1234", formatter.inputDigit('4'));
+    assertEquals("+52 1 55 1234 5", formatter.inputDigit('5'));
+    assertEquals("+52 1 55 1234 56", formatter.inputDigit('6'));
+    assertEquals("+52 1 55 1234 567", formatter.inputDigit('7'));
+    assertEquals("+52 1 55 1234 5678", formatter.inputDigit('8'));
+
+    // +52 1 541 234 5678
+    formatter.clear();
+    assertEquals("+", formatter.inputDigit('+'));
+    assertEquals("+5", formatter.inputDigit('5'));
+    assertEquals("+52 ", formatter.inputDigit('2'));
+    assertEquals("+52 1", formatter.inputDigit('1'));
+    assertEquals("+52 15", formatter.inputDigit('5'));
+    assertEquals("+52 1 54", formatter.inputDigit('4'));
+    assertEquals("+52 1 541", formatter.inputDigit('1'));
+    assertEquals("+52 1 541 2", formatter.inputDigit('2'));
+    assertEquals("+52 1 541 23", formatter.inputDigit('3'));
+    assertEquals("+52 1 541 234", formatter.inputDigit('4'));
+    assertEquals("+52 1 541 234 5", formatter.inputDigit('5'));
+    assertEquals("+52 1 541 234 56", formatter.inputDigit('6'));
+    assertEquals("+52 1 541 234 567", formatter.inputDigit('7'));
+    assertEquals("+52 1 541 234 5678", formatter.inputDigit('8'));
+  }
+
   public void testAYTFMultipleLeadingDigitPatterns() {
     // +81 50 2345 6789
     AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter("JP");
diff --git a/java/test/com/google/i18n/phonenumbers/ExampleNumbersTest.java b/java/test/com/google/i18n/phonenumbers/ExampleNumbersTest.java
index 1d83fa7..776bb22 100644
--- a/java/test/com/google/i18n/phonenumbers/ExampleNumbersTest.java
+++ b/java/test/com/google/i18n/phonenumbers/ExampleNumbersTest.java
@@ -65,7 +65,7 @@
    */
   private void checkNumbersValidAndCorrectType(PhoneNumberType exampleNumberRequestedType,
                                                Set<PhoneNumberType> possibleExpectedTypes) {
-    for (String regionCode : phoneNumberUtil.getSupportedCountries()) {
+    for (String regionCode : phoneNumberUtil.getSupportedRegions()) {
       PhoneNumber exampleNumber =
           phoneNumberUtil.getExampleNumberForType(regionCode, exampleNumberRequestedType);
       if (exampleNumber != null) {
@@ -149,7 +149,7 @@
   }
 
   public void testCanBeInternationallyDialled() throws Exception {
-    for (String regionCode : phoneNumberUtil.getSupportedCountries()) {
+    for (String regionCode : phoneNumberUtil.getSupportedRegions()) {
       PhoneNumber exampleNumber = null;
       PhoneNumberDesc desc =
           phoneNumberUtil.getMetadataForRegion(regionCode).getNoInternationalDialling();
diff --git a/java/test/com/google/i18n/phonenumbers/PhoneNumberMatcherTest.java b/java/test/com/google/i18n/phonenumbers/PhoneNumberMatcherTest.java
index d0485f8..0c55964 100644
--- a/java/test/com/google/i18n/phonenumbers/PhoneNumberMatcherTest.java
+++ b/java/test/com/google/i18n/phonenumbers/PhoneNumberMatcherTest.java
@@ -28,7 +28,6 @@
 
 /**
  * Tests for {@link PhoneNumberMatcher}. This only tests basic functionality based on test metadata.
- * See {@link PhoneNumberMatcherRegressionTest} for regression tests.
  *
  * @author Tom Hofmann
  * @see PhoneNumberUtilTest {@link PhoneNumberUtilTest} for the origin of the test data
@@ -198,6 +197,49 @@
     }
   }
 
+  public void testMatchWithSurroundingZipcodes() throws Exception {
+    String number = "415-666-7777";
+    String zipPreceding = "My address is CA 34215. " + number + " is my number.";
+    PhoneNumber expectedResult = phoneUtil.parse(number, "US");
+
+    Iterator<PhoneNumberMatch> iterator = phoneUtil.findNumbers(zipPreceding, "US").iterator();
+    PhoneNumberMatch match = iterator.hasNext() ? iterator.next() : null;
+    assertNotNull("Did not find a number in '" + zipPreceding + "'; expected " + number, match);
+    assertEquals(expectedResult, match.number());
+    assertEquals(number, match.rawString());
+
+    // Now repeat, but this time the phone number has spaces in it. It should still be found.
+    number = "(415) 666 7777";
+
+    String zipFollowing = "My number is " + number + ". 34215 is my zip-code.";
+    iterator = phoneUtil.findNumbers(zipFollowing, "US").iterator();
+
+    PhoneNumberMatch matchWithSpaces = iterator.hasNext() ? iterator.next() : null;
+    assertNotNull("Did not find a number in '" + zipFollowing + "'; expected " + number,
+                  matchWithSpaces);
+    assertEquals(expectedResult, matchWithSpaces.number());
+    assertEquals(number, matchWithSpaces.rawString());
+  }
+
+  public void testNonMatchingBracketsAreInvalid() throws Exception {
+    // The digits up to the ", " form a valid US number, but it shouldn't be matched as one since
+    // there was a non-matching bracket present.
+    assertTrue(hasNoMatches(phoneUtil.findNumbers(
+        "80.585 [79.964, 81.191]", "US")));
+
+    // The trailing "]" is thrown away before parsing, so the resultant number, while a valid US
+    // number, does not have matching brackets.
+    assertTrue(hasNoMatches(phoneUtil.findNumbers(
+        "80.585 [79.964]", "US")));
+
+    assertTrue(hasNoMatches(phoneUtil.findNumbers(
+        "80.585 ((79.964)", "US")));
+
+    // This case has too many sets of brackets to be valid.
+    assertTrue(hasNoMatches(phoneUtil.findNumbers(
+        "(80).(585) (79).(9)64", "US")));
+  }
+
   public void testNoMatchIfRegionIsNull() throws Exception {
     // Fail on non-international prefix if region code is null.
     assertTrue(hasNoMatches(phoneUtil.findNumbers(
@@ -417,7 +459,7 @@
   }
 
   /**
-   * Tests numbers found by {@link PhoneNumberUtil#find(CharSequence, String)} in various
+   * Tests numbers found by {@link PhoneNumberUtil#findNumbers(CharSequence, String)} in various
    * textual contexts.
    *
    * @param number the number to test and the corresponding region code to use
@@ -453,7 +495,18 @@
         "As quoted by Alfonso 12-15 (2009), you may call me at ", ""));
     contextPairs.add(new NumberContext(
         "As quoted by Alfonso et al. 12-15 (2009), you may call me at ", ""));
-         // with a postfix stripped off as it looks like the start of another number
+    // With dates, written in the American style.
+    contextPairs.add(new NumberContext(
+        "As I said on 03/10/2011, you may call me at ", ""));
+    contextPairs.add(new NumberContext(
+        "As I said on 03/27/2011, you may call me at ", ""));
+    contextPairs.add(new NumberContext(
+        "As I said on 31/8/2011, you may call me at ", ""));
+    contextPairs.add(new NumberContext(
+        "As I said on 1/12/2011, you may call me at ", ""));
+    contextPairs.add(new NumberContext(
+        "I was born on 10/12/82. Please call me at ", ""));
+    // With a postfix stripped off as it looks like the start of another number
     contextPairs.add(new NumberContext("Call ", "/x12 more"));
 
     doTestInContext(number, defaultCountry, contextPairs, Leniency.POSSIBLE);
@@ -508,7 +561,7 @@
   private void ensureTermination(String text, String defaultCountry, Leniency leniency) {
     for (int index = 0; index <= text.length(); index++) {
       String sub = text.substring(index);
-      StringBuffer matches = new StringBuffer();
+      StringBuilder matches = new StringBuilder();
       // Iterates over all matches.
       for (PhoneNumberMatch match :
            phoneUtil.findNumbers(sub, defaultCountry, leniency, Long.MAX_VALUE)) {
diff --git a/java/test/com/google/i18n/phonenumbers/PhoneNumberOfflineGeocoderTest.java b/java/test/com/google/i18n/phonenumbers/PhoneNumberOfflineGeocoderTest.java
new file mode 100644
index 0000000..facd3c4
--- /dev/null
+++ b/java/test/com/google/i18n/phonenumbers/PhoneNumberOfflineGeocoderTest.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2011 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.i18n.phonenumbers;
+
+import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
+import junit.framework.TestCase;
+
+import java.util.Locale;
+
+/**
+ * Unit tests for PhoneNumberOfflineGeocoder.java
+ *
+ * @author Shaopeng Jia
+ */
+public class PhoneNumberOfflineGeocoderTest extends TestCase {
+  private PhoneNumberOfflineGeocoder geocoder;
+  static final String TEST_META_DATA_FILE_PREFIX =
+      "/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting";
+
+  // Set up some test numbers to re-use.
+  private static final PhoneNumber US_NUMBER1 =
+      new PhoneNumber().setCountryCode(1).setNationalNumber(6502530000L);
+  private static final PhoneNumber BS_NUMBER1 =
+      new PhoneNumber().setCountryCode(1).setNationalNumber(2423651234L);
+  private static final PhoneNumber AU_NUMBER =
+      new PhoneNumber().setCountryCode(61).setNationalNumber(236618300L);
+  private static final PhoneNumber NUMBER_WITH_INVALID_COUNTRY_CODE =
+      new PhoneNumber().setCountryCode(999).setNationalNumber(2423651234L);
+
+  public PhoneNumberOfflineGeocoderTest() {
+    PhoneNumberUtil.resetInstance();
+    PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(
+        TEST_META_DATA_FILE_PREFIX,
+        CountryCodeToRegionCodeMapForTesting.getCountryCodeToRegionCodeMap());
+    geocoder = new PhoneNumberOfflineGeocoder(phoneUtil);
+  }
+
+  public void testGetCompactDescriptionForNumber() {
+    assertEquals("United States",
+        geocoder.getDescriptionForNumber(US_NUMBER1, Locale.ENGLISH));
+    assertEquals("Stati Uniti",
+        geocoder.getDescriptionForNumber(US_NUMBER1, Locale.ITALIAN));
+    assertEquals("Bahamas",
+        geocoder.getDescriptionForNumber(BS_NUMBER1, Locale.ENGLISH));
+    assertEquals("Australia",
+        geocoder.getDescriptionForNumber(AU_NUMBER, Locale.ENGLISH));
+    assertEquals("", geocoder.getDescriptionForNumber(NUMBER_WITH_INVALID_COUNTRY_CODE,
+                                                      Locale.ENGLISH));
+  }
+}
diff --git a/java/test/com/google/i18n/phonenumbers/PhoneNumberUtilTest.java b/java/test/com/google/i18n/phonenumbers/PhoneNumberUtilTest.java
index 7c77f1e..f4a2751 100644
--- a/java/test/com/google/i18n/phonenumbers/PhoneNumberUtilTest.java
+++ b/java/test/com/google/i18n/phonenumbers/PhoneNumberUtilTest.java
@@ -71,6 +71,15 @@
   private static final PhoneNumber IT_NUMBER =
       new PhoneNumber().setCountryCode(39).setNationalNumber(236618300L).
       setItalianLeadingZero(true);
+  // Numbers to test the formatting rules from Mexico.
+  private static final PhoneNumber MX_MOBILE1 =
+      new PhoneNumber().setCountryCode(52).setNationalNumber(12345678900L);
+  private static final PhoneNumber MX_MOBILE2 =
+      new PhoneNumber().setCountryCode(52).setNationalNumber(15512345678L);
+  private static final PhoneNumber MX_NUMBER1 =
+      new PhoneNumber().setCountryCode(52).setNationalNumber(3312345678L);
+  private static final PhoneNumber MX_NUMBER2 =
+      new PhoneNumber().setCountryCode(52).setNationalNumber(8211234567L);
   private static final PhoneNumber NZ_NUMBER =
       new PhoneNumber().setCountryCode(64).setNationalNumber(33316005L);
   private static final PhoneNumber SG_NUMBER =
@@ -124,19 +133,23 @@
         CountryCodeToRegionCodeMapForTesting.getCountryCodeToRegionCodeMap());
   }
 
+  public void testGetSupportedRegions() {
+    assertTrue(phoneUtil.getSupportedRegions().size() > 0);
+  }
+
   public void testGetInstanceLoadUSMetadata() {
     PhoneMetadata metadata = phoneUtil.getMetadataForRegion(RegionCode.US);
     assertEquals("US", metadata.getId());
     assertEquals(1, metadata.getCountryCode());
     assertEquals("011", metadata.getInternationalPrefix());
     assertTrue(metadata.hasNationalPrefix());
-    assertEquals(2, metadata.getNumberFormatCount());
+    assertEquals(2, metadata.numberFormatSize());
     assertEquals("(\\d{3})(\\d{3})(\\d{4})",
                  metadata.getNumberFormat(0).getPattern());
     assertEquals("$1 $2 $3", metadata.getNumberFormat(0).getFormat());
     assertEquals("[13-9]\\d{9}|2[0-35-9]\\d{8}",
                  metadata.getGeneralDesc().getNationalNumberPattern());
-    assertEquals("\\d{7,10}", metadata.getGeneralDesc().getPossibleNumberPattern());
+    assertEquals("\\d{7}(?:\\d{3})?", metadata.getGeneralDesc().getPossibleNumberPattern());
     assertTrue(metadata.getGeneralDesc().exactlySameAs(metadata.getFixedLine()));
     assertEquals("\\d{10}", metadata.getTollFree().getPossibleNumberPattern());
     assertEquals("900\\d{7}", metadata.getPremiumRate().getNationalNumberPattern());
@@ -151,8 +164,8 @@
     assertEquals(49, metadata.getCountryCode());
     assertEquals("00", metadata.getInternationalPrefix());
     assertEquals("0", metadata.getNationalPrefix());
-    assertEquals(6, metadata.getNumberFormatCount());
-    assertEquals(1, metadata.getNumberFormat(5).getLeadingDigitsPatternCount());
+    assertEquals(6, metadata.numberFormatSize());
+    assertEquals(1, metadata.getNumberFormat(5).leadingDigitsPatternSize());
     assertEquals("900", metadata.getNumberFormat(5).getLeadingDigitsPattern(0));
     assertEquals("(\\d{3})(\\d{3,4})(\\d{4})",
                  metadata.getNumberFormat(5).getPattern());
@@ -173,14 +186,21 @@
     assertEquals("0", metadata.getNationalPrefix());
     assertEquals("0(?:(11|343|3715)15)?", metadata.getNationalPrefixForParsing());
     assertEquals("9$1", metadata.getNationalPrefixTransformRule());
-    assertEquals("$1 15 $2-$3", metadata.getNumberFormat(2).getFormat());
-    assertEquals("9(\\d{4})(\\d{2})(\\d{4})",
+    assertEquals("$2 15 $3-$4", metadata.getNumberFormat(2).getFormat());
+    assertEquals("(9)(\\d{4})(\\d{2})(\\d{4})",
                  metadata.getNumberFormat(3).getPattern());
     assertEquals("(9)(\\d{4})(\\d{2})(\\d{4})",
                  metadata.getIntlNumberFormat(3).getPattern());
     assertEquals("$1 $2 $3 $4", metadata.getIntlNumberFormat(3).getFormat());
   }
 
+  public void testIsLeadingZeroPossible() {
+    assertTrue(phoneUtil.isLeadingZeroPossible(39));  // Italy
+    assertFalse(phoneUtil.isLeadingZeroPossible(1));  // USA
+    assertFalse(phoneUtil.isLeadingZeroPossible(800));  // Not in metadata file, just default to
+                                                        // false.
+  }
+
   public void testGetLengthOfGeographicalAreaCode() {
     // Google MTV, which has area code "650".
     assertEquals(3, phoneUtil.getLengthOfGeographicalAreaCode(US_NUMBER));
@@ -235,19 +255,19 @@
     // An invalid US number (1 digit shorter), which has no NDC.
     assertEquals(0, phoneUtil.getLengthOfNationalDestinationCode(US_SHORT_BY_ONE_NUMBER));
 
-    // A number containing an invalid country code, which shouldn't have any NDC.
+    // A number containing an invalid country calling code, which shouldn't have any NDC.
     PhoneNumber number = new PhoneNumber().setCountryCode(123).setNationalNumber(6502530000L);
     assertEquals(0, phoneUtil.getLengthOfNationalDestinationCode(number));
   }
 
   public void testGetNationalSignificantNumber() {
-    assertEquals("6502530000", PhoneNumberUtil.getNationalSignificantNumber(US_NUMBER));
+    assertEquals("6502530000", phoneUtil.getNationalSignificantNumber(US_NUMBER));
 
     // An Italian mobile number.
-    assertEquals("345678901", PhoneNumberUtil.getNationalSignificantNumber(IT_MOBILE));
+    assertEquals("345678901", phoneUtil.getNationalSignificantNumber(IT_MOBILE));
 
     // An Italian fixed line number.
-    assertEquals("0236618300", PhoneNumberUtil.getNationalSignificantNumber(IT_NUMBER));
+    assertEquals("0236618300", phoneUtil.getNationalSignificantNumber(IT_NUMBER));
   }
 
   public void testGetExampleNumber() {
@@ -265,6 +285,9 @@
                                                     PhoneNumberUtil.PhoneNumberType.FIXED_LINE));
     assertNotNull(phoneUtil.getExampleNumberForType(RegionCode.US,
                                                     PhoneNumberUtil.PhoneNumberType.MOBILE));
+    // CS is an invalid region, so we have no data for it.
+    assertNull(phoneUtil.getExampleNumberForType(RegionCode.CS,
+                                                 PhoneNumberUtil.PhoneNumberType.MOBILE));
   }
 
   public void testNormaliseRemovePunctuation() {
@@ -314,6 +337,7 @@
 
     assertEquals("900 253 0000", phoneUtil.format(US_PREMIUM, PhoneNumberFormat.NATIONAL));
     assertEquals("+1 900 253 0000", phoneUtil.format(US_PREMIUM, PhoneNumberFormat.INTERNATIONAL));
+    assertEquals("+1-900-253-0000", phoneUtil.format(US_PREMIUM, PhoneNumberFormat.RFC3966));
   }
 
   public void testFormatBSNumber() {
@@ -332,8 +356,9 @@
   public void testFormatDENumber() {
     PhoneNumber deNumber = new PhoneNumber();
     deNumber.setCountryCode(49).setNationalNumber(301234L);
-    assertEquals("030 1234", phoneUtil.format(deNumber, PhoneNumberFormat.NATIONAL));
-    assertEquals("+49 30 1234", phoneUtil.format(deNumber, PhoneNumberFormat.INTERNATIONAL));
+    assertEquals("030/1234", phoneUtil.format(deNumber, PhoneNumberFormat.NATIONAL));
+    assertEquals("+49 30/1234", phoneUtil.format(deNumber, PhoneNumberFormat.INTERNATIONAL));
+    assertEquals("+49-30-1234", phoneUtil.format(deNumber, PhoneNumberFormat.RFC3966));
 
     deNumber.clear();
     deNumber.setCountryCode(49).setNationalNumber(291123L);
@@ -359,6 +384,7 @@
     assertEquals("1234", phoneUtil.format(DE_SHORT_NUMBER, PhoneNumberFormat.NATIONAL));
     assertEquals("+49 1234", phoneUtil.format(DE_SHORT_NUMBER, PhoneNumberFormat.INTERNATIONAL));
 
+    deNumber.clear();
     deNumber.setCountryCode(49).setNationalNumber(41341234);
     assertEquals("04134 1234", phoneUtil.format(deNumber, PhoneNumberFormat.NATIONAL));
   }
@@ -395,6 +421,26 @@
     assertEquals("+5491187654321", phoneUtil.format(AR_MOBILE, PhoneNumberFormat.E164));
   }
 
+  public void testFormatMXNumber() {
+    assertEquals("045 234 567 8900", phoneUtil.format(MX_MOBILE1, PhoneNumberFormat.NATIONAL));
+    assertEquals("+52 1 234 567 8900", phoneUtil.format(
+        MX_MOBILE1, PhoneNumberFormat.INTERNATIONAL));
+    assertEquals("+5212345678900", phoneUtil.format(MX_MOBILE1, PhoneNumberFormat.E164));
+
+    assertEquals("045 55 1234 5678", phoneUtil.format(MX_MOBILE2, PhoneNumberFormat.NATIONAL));
+    assertEquals("+52 1 55 1234 5678", phoneUtil.format(
+        MX_MOBILE2, PhoneNumberFormat.INTERNATIONAL));
+    assertEquals("+5215512345678", phoneUtil.format(MX_MOBILE2, PhoneNumberFormat.E164));
+
+    assertEquals("01 33 1234 5678", phoneUtil.format(MX_NUMBER1, PhoneNumberFormat.NATIONAL));
+    assertEquals("+52 33 1234 5678", phoneUtil.format(MX_NUMBER1, PhoneNumberFormat.INTERNATIONAL));
+    assertEquals("+523312345678", phoneUtil.format(MX_NUMBER1, PhoneNumberFormat.E164));
+
+    assertEquals("01 821 123 4567", phoneUtil.format(MX_NUMBER2, PhoneNumberFormat.NATIONAL));
+    assertEquals("+52 821 123 4567", phoneUtil.format(MX_NUMBER2, PhoneNumberFormat.INTERNATIONAL));
+    assertEquals("+528211234567", phoneUtil.format(MX_NUMBER2, PhoneNumberFormat.E164));
+  }
+
   public void testFormatOutOfCountryCallingNumber() {
     assertEquals("00 1 900 253 0000",
                  phoneUtil.formatOutOfCountryCallingNumber(US_PREMIUM, RegionCode.DE));
@@ -444,6 +490,79 @@
                  phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER, RegionCode.AU));
   }
 
+  public void testFormatOutOfCountryKeepingAlphaChars() {
+    PhoneNumber alphaNumericNumber = new PhoneNumber();
+    alphaNumericNumber.setCountryCode(1).setNationalNumber(8007493524L)
+        .setRawInput("1800 six-flag");
+    assertEquals("0011 1 800 SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    alphaNumericNumber.setRawInput("1-800-SIX-flag");
+    assertEquals("0011 1 800-SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    alphaNumericNumber.setRawInput("Call us from UK: 00 1 800 SIX-flag");
+    assertEquals("0011 1 800 SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    alphaNumericNumber.setRawInput("800 SIX-flag");
+    assertEquals("0011 1 800 SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    // Formatting from within the NANPA region.
+    assertEquals("1 800 SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.US));
+
+    assertEquals("1 800 SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.BS));
+
+    // Testing that if the raw input doesn't exist, it is formatted using
+    // formatOutOfCountryCallingNumber.
+    alphaNumericNumber.clearRawInput();
+    assertEquals("00 1 800 749 3524",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.DE));
+
+    // Testing AU alpha number formatted from Australia.
+    alphaNumericNumber.setCountryCode(61).setNationalNumber(827493524L)
+        .setRawInput("+61 82749-FLAG");
+    // This number should have the national prefix fixed.
+    assertEquals("082749-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    alphaNumericNumber.setRawInput("082749-FLAG");
+    assertEquals("082749-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    alphaNumericNumber.setNationalNumber(18007493524L).setRawInput("1-800-SIX-flag");
+    // This number should not have the national prefix prefixed, in accordance with the override for
+    // this specific formatting rule.
+    assertEquals("1-800-SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    // The metadata should not be permanently changed, since we copied it before modifying patterns.
+    // Here we check this.
+    alphaNumericNumber.setNationalNumber(1800749352L);
+    assertEquals("1800 749 352",
+                 phoneUtil.formatOutOfCountryCallingNumber(alphaNumericNumber, RegionCode.AU));
+
+    // Testing a region with multiple international prefixes.
+    assertEquals("+61 1-800-SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.SG));
+
+    // Testing the case with an invalid country calling code.
+    alphaNumericNumber.setCountryCode(0).setNationalNumber(18007493524L)
+        .setRawInput("1-800-SIX-flag");
+    // Uses the raw input only.
+    assertEquals("1-800-SIX-flag",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.DE));
+
+    // Testing the case of an invalid alpha number.
+    alphaNumericNumber.setCountryCode(1).setNationalNumber(80749L).setRawInput("180-SIX");
+    // No country-code stripping can be done.
+    assertEquals("00 1 180-SIX",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.DE));
+  }
+
   public void testFormatWithCarrierCode() {
     // We only support this for AR in our test metadata, and only for mobile numbers starting with
     // certain values.
@@ -557,6 +676,8 @@
     PhoneNumber nzNumber = new PhoneNumber().mergeFrom(NZ_NUMBER).setExtension("1234");
     // Uses default extension prefix:
     assertEquals("03-331 6005 ext. 1234", phoneUtil.format(nzNumber, PhoneNumberFormat.NATIONAL));
+    // Uses RFC 3966 syntax.
+    assertEquals("+64-3-331-6005;ext=1234", phoneUtil.format(nzNumber, PhoneNumberFormat.RFC3966));
     // Extension prefix overridden in the territory information for the US:
     PhoneNumber usNumberWithExtension = new PhoneNumber().mergeFrom(US_NUMBER).setExtension("4567");
     assertEquals("650 253 0000 extn. 4567", phoneUtil.format(usNumberWithExtension,
@@ -631,12 +752,11 @@
     assertEquals(PhoneNumberUtil.PhoneNumberType.MOBILE, phoneUtil.getNumberType(BS_MOBILE));
     assertEquals(PhoneNumberUtil.PhoneNumberType.MOBILE, phoneUtil.getNumberType(GB_MOBILE));
     assertEquals(PhoneNumberUtil.PhoneNumberType.MOBILE, phoneUtil.getNumberType(IT_MOBILE));
+    assertEquals(PhoneNumberUtil.PhoneNumberType.MOBILE, phoneUtil.getNumberType(AR_MOBILE));
 
     PhoneNumber mobileNumber = new PhoneNumber();
     mobileNumber.setCountryCode(49).setNationalNumber(15123456789L);
     assertEquals(PhoneNumberUtil.PhoneNumberType.MOBILE, phoneUtil.getNumberType(mobileNumber));
-
-    assertEquals(PhoneNumberUtil.PhoneNumberType.MOBILE, phoneUtil.getNumberType(AR_MOBILE));
   }
 
   public void testIsFixedLine() {
@@ -805,7 +925,7 @@
   }
 
   public void testIsPossibleNumberWithReason() {
-    // FYI, national numbers for country code +1 that are within 7 to 10 digits are possible.
+    // National numbers for country calling code +1 that are within 7 to 10 digits are possible.
     assertEquals(PhoneNumberUtil.ValidationResult.IS_POSSIBLE,
                  phoneUtil.isPossibleNumberWithReason(US_NUMBER));
 
@@ -825,6 +945,11 @@
     assertEquals(PhoneNumberUtil.ValidationResult.TOO_SHORT,
                  phoneUtil.isPossibleNumberWithReason(number));
 
+    number.clear();
+    number.setCountryCode(65).setNationalNumber(1234567890L);
+    assertEquals(PhoneNumberUtil.ValidationResult.IS_POSSIBLE,
+                 phoneUtil.isPossibleNumberWithReason(number));
+
     // Try with number that we don't have metadata for.
     PhoneNumber adNumber = new PhoneNumber();
     adNumber.setCountryCode(376).setNationalNumber(12345L);
@@ -949,7 +1074,7 @@
     PhoneMetadata metadata = new PhoneMetadata();
     metadata.setNationalPrefixForParsing("34");
     metadata.setGeneralDesc(new PhoneNumberDesc().setNationalNumberPattern("\\d{4,8}"));
-    StringBuffer numberToStrip = new StringBuffer("34356778");
+    StringBuilder numberToStrip = new StringBuilder("34356778");
     String strippedNumber = "356778";
     phoneUtil.maybeStripNationalPrefixAndCarrierCode(numberToStrip, metadata);
     assertEquals("Should have had national prefix stripped.",
@@ -966,7 +1091,7 @@
                  strippedNumber, numberToStrip.toString());
     // If the resultant number doesn't match the national rule, it shouldn't be stripped.
     metadata.setNationalPrefixForParsing("3");
-    numberToStrip = new StringBuffer("3123");
+    numberToStrip = new StringBuilder("3123");
     strippedNumber = "3123";
     phoneUtil.maybeStripNationalPrefixAndCarrierCode(numberToStrip, metadata);
     assertEquals("Should have had no change - after stripping, it wouldn't have matched " +
@@ -974,7 +1099,7 @@
                  strippedNumber, numberToStrip.toString());
     // Test extracting carrier selection code.
     metadata.setNationalPrefixForParsing("0(81)?");
-    numberToStrip = new StringBuffer("08122123456");
+    numberToStrip = new StringBuilder("08122123456");
     strippedNumber = "22123456";
     assertEquals("81", phoneUtil.maybeStripNationalPrefixAndCarrierCode(numberToStrip, metadata));
     assertEquals("Should have had national prefix and carrier code stripped.",
@@ -983,7 +1108,7 @@
     metadata.setNationalPrefixTransformRule("5$15");
     // Note that a capturing group is present here.
     metadata.setNationalPrefixForParsing("0(\\d{2})");
-    numberToStrip = new StringBuffer("031123");
+    numberToStrip = new StringBuilder("031123");
     String transformedNumber = "5315123";
     phoneUtil.maybeStripNationalPrefixAndCarrierCode(numberToStrip, metadata);
     assertEquals("Should transform the 031 to a 5315.",
@@ -992,9 +1117,9 @@
 
   public void testMaybeStripInternationalPrefix() {
     String internationalPrefix = "00[39]";
-    StringBuffer numberToStrip = new StringBuffer("0034567700-3898003");
+    StringBuilder numberToStrip = new StringBuilder("0034567700-3898003");
     // Note the dash is removed as part of the normalization.
-    StringBuffer strippedNumber = new StringBuffer("45677003898003");
+    StringBuilder strippedNumber = new StringBuilder("45677003898003");
     assertEquals(CountryCodeSource.FROM_NUMBER_WITH_IDD,
                  phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
                                                                      internationalPrefix));
@@ -1006,14 +1131,14 @@
                  phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
                                                                      internationalPrefix));
 
-    numberToStrip = new StringBuffer("00945677003898003");
+    numberToStrip = new StringBuilder("00945677003898003");
     assertEquals(CountryCodeSource.FROM_NUMBER_WITH_IDD,
                  phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
                                                                      internationalPrefix));
     assertEquals("The number supplied was not stripped of its international prefix.",
                  strippedNumber.toString(), numberToStrip.toString());
     // Test it works when the international prefix is broken up by spaces.
-    numberToStrip = new StringBuffer("00 9 45677003898003");
+    numberToStrip = new StringBuilder("00 9 45677003898003");
     assertEquals(CountryCodeSource.FROM_NUMBER_WITH_IDD,
                  phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
                                                                      internationalPrefix));
@@ -1026,24 +1151,25 @@
                                                                      internationalPrefix));
 
     // Test the + symbol is also recognised and stripped.
-    numberToStrip = new StringBuffer("+45677003898003");
-    strippedNumber = new StringBuffer("45677003898003");
+    numberToStrip = new StringBuilder("+45677003898003");
+    strippedNumber = new StringBuilder("45677003898003");
     assertEquals(CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN,
                  phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
                                                                      internationalPrefix));
     assertEquals("The number supplied was not stripped of the plus symbol.",
                  strippedNumber.toString(), numberToStrip.toString());
 
-    // If the number afterwards is a zero, we should not strip this - no country code begins with 0.
-    numberToStrip = new StringBuffer("0090112-3123");
-    strippedNumber = new StringBuffer("00901123123");
+    // If the number afterwards is a zero, we should not strip this - no country calling code begins
+    // with 0.
+    numberToStrip = new StringBuilder("0090112-3123");
+    strippedNumber = new StringBuilder("00901123123");
     assertEquals(CountryCodeSource.FROM_DEFAULT_COUNTRY,
                  phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
                                                                      internationalPrefix));
     assertEquals("The number supplied had a 0 after the match so shouldn't be stripped.",
                  strippedNumber.toString(), numberToStrip.toString());
     // Here the 0 is separated by a space from the IDD.
-    numberToStrip = new StringBuffer("009 0-112-3123");
+    numberToStrip = new StringBuilder("009 0-112-3123");
     assertEquals(CountryCodeSource.FROM_DEFAULT_COUNTRY,
                  phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
                                                                      internationalPrefix));
@@ -1056,16 +1182,16 @@
     try {
       String phoneNumber = "011112-3456789";
       String strippedNumber = "123456789";
-      int countryCode = 1;
-      StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Did not extract country code " + countryCode + " correctly.",
-                   countryCode,
+      int countryCallingCode = 1;
+      StringBuilder numberToFill = new StringBuilder();
+      assertEquals("Did not extract country calling code " + countryCallingCode + " correctly.",
+                   countryCallingCode,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true,
                                                      number));
       assertEquals("Did not figure out CountryCodeSource correctly",
                    CountryCodeSource.FROM_NUMBER_WITH_IDD, number.getCountryCodeSource());
       // Should strip and normalize national significant number.
-      assertEquals("Did not strip off the country code correctly.",
+      assertEquals("Did not strip off the country calling code correctly.",
                    strippedNumber,
                    numberToFill.toString());
     } catch (NumberParseException e) {
@@ -1074,10 +1200,10 @@
     number.clear();
     try {
       String phoneNumber = "+6423456789";
-      int countryCode = 64;
-      StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Did not extract country code " + countryCode + " correctly.",
-                   countryCode,
+      int countryCallingCode = 64;
+      StringBuilder numberToFill = new StringBuilder();
+      assertEquals("Did not extract country calling code " + countryCallingCode + " correctly.",
+                   countryCallingCode,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true,
                                                      number));
       assertEquals("Did not figure out CountryCodeSource correctly",
@@ -1088,11 +1214,11 @@
     number.clear();
     try {
       String phoneNumber = "2345-6789";
-      StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Should not have extracted a country code - no international prefix present.",
-                   0,
-                   phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true,
-                                                     number));
+      StringBuilder numberToFill = new StringBuilder();
+      assertEquals(
+          "Should not have extracted a country calling code - no international prefix present.",
+          0,
+          phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true, number));
       assertEquals("Did not figure out CountryCodeSource correctly",
                    CountryCodeSource.FROM_DEFAULT_COUNTRY, number.getCountryCodeSource());
     } catch (NumberParseException e) {
@@ -1101,9 +1227,9 @@
     number.clear();
     try {
       String phoneNumber = "0119991123456789";
-      StringBuffer numberToFill = new StringBuffer();
+      StringBuilder numberToFill = new StringBuilder();
       phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true, number);
-      fail("Should have thrown an exception, no valid country code present.");
+      fail("Should have thrown an exception, no valid country calling code present.");
     } catch (NumberParseException e) {
       // Expected.
       assertEquals("Wrong error type stored in exception.",
@@ -1113,10 +1239,10 @@
     number.clear();
     try {
       String phoneNumber = "(1 610) 619 4466";
-      int countryCode = 1;
-      StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Should have extracted the country code of the region passed in",
-                   countryCode,
+      int countryCallingCode = 1;
+      StringBuilder numberToFill = new StringBuilder();
+      assertEquals("Should have extracted the country calling code of the region passed in",
+                   countryCallingCode,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true,
                                                      number));
       assertEquals("Did not figure out CountryCodeSource correctly",
@@ -1128,10 +1254,10 @@
     number.clear();
     try {
       String phoneNumber = "(1 610) 619 4466";
-      int countryCode = 1;
-      StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Should have extracted the country code of the region passed in",
-                   countryCode,
+      int countryCallingCode = 1;
+      StringBuilder numberToFill = new StringBuilder();
+      assertEquals("Should have extracted the country calling code of the region passed in",
+                   countryCallingCode,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, false,
                                                      number));
       assertFalse("Should not contain CountryCodeSource.", number.hasCountryCodeSource());
@@ -1141,9 +1267,9 @@
     number.clear();
     try {
       String phoneNumber = "(1 610) 619 446";
-      StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Should not have extracted a country code - invalid number after extraction " +
-                   "of uncertain country code.",
+      StringBuilder numberToFill = new StringBuilder();
+      assertEquals("Should not have extracted a country calling code - invalid number after " +
+                   "extraction of uncertain country calling code.",
                    0,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, false,
                                                      number));
@@ -1153,10 +1279,10 @@
     }
     number.clear();
     try {
-      String phoneNumber = "(1 610) 619 43";
-      StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Should not have extracted a country code - invalid number both before and " +
-                   "after extraction of uncertain country code.",
+      String phoneNumber = "(1 610) 619";
+      StringBuilder numberToFill = new StringBuilder();
+      assertEquals("Should not have extracted a country calling code - too short number both " +
+                   "before and after extraction of uncertain country calling code.",
                    0,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true,
                                                      number));
@@ -1177,10 +1303,10 @@
     assertEquals(NZ_NUMBER, phoneUtil.parse("03 331 6005", RegionCode.NZ));
 
     // Testing international prefixes.
-    // Should strip country code.
+    // Should strip country calling code.
     assertEquals(NZ_NUMBER, phoneUtil.parse("0064 3 331 6005", RegionCode.NZ));
     // Try again, but this time we have an international number with Region Code US. It should
-    // recognise the country code and parse accordingly.
+    // recognise the country calling code and parse accordingly.
     assertEquals(NZ_NUMBER, phoneUtil.parse("01164 3 331 6005", RegionCode.US));
     assertEquals(NZ_NUMBER, phoneUtil.parse("+64 3 331 6005", RegionCode.US));
 
@@ -1191,8 +1317,8 @@
     assertEquals(DE_NUMBER, phoneUtil.parse("301/23456", RegionCode.DE));
 
     PhoneNumber usNumber = new PhoneNumber();
-    // Check it doesn't use the '1' as a country code when parsing if the phone number was already
-    // possible.
+    // Check it doesn't use the '1' as a country calling code when parsing if the phone number was
+    // already possible.
     usNumber.setCountryCode(1).setNationalNumber(1234567890L);
     assertEquals(usNumber, phoneUtil.parse("123-456-7890", RegionCode.US));
   }
@@ -1350,7 +1476,7 @@
     try {
       String invalidCountryCode = "+210 3456 56789";
       phoneUtil.parse(invalidCountryCode, RegionCode.NZ);
-      fail("This is not a recognised country code: should fail: " + invalidCountryCode);
+      fail("This is not a recognised region code: should fail: " + invalidCountryCode);
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1359,8 +1485,8 @@
     }
     try {
       String someNumber = "123 456 7890";
-      phoneUtil.parse(someNumber, "YY");
-      fail("'Unknown' country code not allowed: should fail.");
+      phoneUtil.parse(someNumber, RegionCode.ZZ);
+      fail("'Unknown' region code not allowed: should fail.");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1370,7 +1496,7 @@
     try {
       String someNumber = "123 456 7890";
       phoneUtil.parse(someNumber, RegionCode.CS);
-      fail("Deprecated country code not allowed: should fail.");
+      fail("Deprecated region code not allowed: should fail.");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1380,7 +1506,7 @@
     try {
       String someNumber = "123 456 7890";
       phoneUtil.parse(someNumber, null);
-      fail("Null country code not allowed: should fail.");
+      fail("Null region code not allowed: should fail.");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1390,7 +1516,7 @@
     try {
       String someNumber = "0044------";
       phoneUtil.parse(someNumber, RegionCode.GB);
-      fail("No number provided, only country code: should fail");
+      fail("No number provided, only region code: should fail");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1400,7 +1526,7 @@
     try {
       String someNumber = "0044";
       phoneUtil.parse(someNumber, RegionCode.GB);
-      fail("No number provided, only country code: should fail");
+      fail("No number provided, only region code: should fail");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1466,8 +1592,8 @@
   }
 
   public void testParseNumbersWithPlusWithNoRegion() throws Exception {
-    // "ZZ" is allowed only if the number starts with a '+' - then the country code can be
-    // calculated.
+    // RegionCode.ZZ is allowed only if the number starts with a '+' - then the country calling code
+    // can be calculated.
     assertEquals(NZ_NUMBER, phoneUtil.parse("+64 3 331 6005", RegionCode.ZZ));
     // Test with full-width plus.
     assertEquals(NZ_NUMBER, phoneUtil.parse("\uFF0B64 3 331 6005", RegionCode.ZZ));
@@ -1514,6 +1640,7 @@
     assertEquals(ukNumber, phoneUtil.parse("+44 2034567890 X  456", RegionCode.GB));
     assertEquals(ukNumber, phoneUtil.parse("+44 2034567890 x 456  ", RegionCode.GB));
     assertEquals(ukNumber, phoneUtil.parse("+44 2034567890  X 456", RegionCode.GB));
+    assertEquals(ukNumber, phoneUtil.parse("+44-2034567890;ext=456", RegionCode.GB));
 
     PhoneNumber usWithExtension = new PhoneNumber();
     usWithExtension.setCountryCode(1).setNationalNumber(8009013355L).setExtension("7246433");
@@ -1577,7 +1704,7 @@
     // Invalid region code supplied.
     try {
       phoneUtil.parseAndKeepRawInput("123 456 7890", RegionCode.CS);
-      fail("Deprecated country code not allowed: should fail.");
+      fail("Deprecated region code not allowed: should fail.");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1614,8 +1741,8 @@
   }
 
   public void testIsNumberMatchMatches() throws Exception {
-    // Test simple matches where formatting is different, or leading zeroes, or country code has
-    // been specified.
+    // Test simple matches where formatting is different, or leading zeroes, or country calling code
+    // has been specified.
     assertEquals(PhoneNumberUtil.MatchType.EXACT_MATCH,
                  phoneUtil.isNumberMatch("+64 3 331 6005", "+64 03 331 6005"));
     assertEquals(PhoneNumberUtil.MatchType.EXACT_MATCH,
@@ -1665,10 +1792,10 @@
     // Non-matches.
     assertEquals(PhoneNumberUtil.MatchType.NO_MATCH,
                  phoneUtil.isNumberMatch("03 331 6005", "03 331 6006"));
-    // Different country code, partial number match.
+    // Different country calling code, partial number match.
     assertEquals(PhoneNumberUtil.MatchType.NO_MATCH,
                  phoneUtil.isNumberMatch("+64 3 331-6005", "+16433316005"));
-    // Different country code, same number.
+    // Different country calling code, same number.
     assertEquals(PhoneNumberUtil.MatchType.NO_MATCH,
                  phoneUtil.isNumberMatch("+64 3 331-6005", "+6133316005"));
     // Extension different, all else the same.
@@ -1697,8 +1824,8 @@
                  phoneUtil.isNumberMatch("3 331-6005", "03 331 6005"));
     assertEquals(PhoneNumberUtil.MatchType.NSN_MATCH,
                  phoneUtil.isNumberMatch(NZ_NUMBER, "03 331 6005"));
-    // Here the second number possibly starts with the country code for New Zealand, although we are
-    // unsure.
+    // Here the second number possibly starts with the country calling code for New Zealand,
+    // although we are unsure.
     PhoneNumber unchangedNzNumber = new PhoneNumber().mergeFrom(NZ_NUMBER);
     assertEquals(PhoneNumberUtil.MatchType.NSN_MATCH,
                  phoneUtil.isNumberMatch(unchangedNzNumber, "(64-3) 331 6005"));
@@ -1740,7 +1867,7 @@
                  phoneUtil.isNumberMatch("1 234 345 6789", "345 6789"));
     assertEquals(PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
                  phoneUtil.isNumberMatch("+1 (234) 345 6789", "345 6789"));
-    // NSN matches, country code omitted for one number, extension missing for one.
+    // NSN matches, country calling code omitted for one number, extension missing for one.
     assertEquals(PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
                  phoneUtil.isNumberMatch("+64 3 331-6005", "3 331 6005#1234"));
     // One has Italian leading zero, one does not.
@@ -1771,4 +1898,11 @@
     // We have no data for NZ - should return true.
     assertTrue(phoneUtil.canBeInternationallyDialled(NZ_NUMBER));
   }
+
+  public void testIsAlphaNumber() throws Exception {
+    assertTrue(phoneUtil.isAlphaNumber("1800 six-flags"));
+    assertTrue(phoneUtil.isAlphaNumber("1800 six-flags ext. 1234"));
+    assertFalse(phoneUtil.isAlphaNumber("1800 123-1234"));
+    assertFalse(phoneUtil.isAlphaNumber("1800 123-1234 extension: 1234"));
+  }
 }
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AD b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AD
index f72b264..0554c1f 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AD
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AD
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AO b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AO
index 486d96d..8f829b8 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AO
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AO
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AR b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AR
index e2efc8f..80e8ebf 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AR
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AR
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AU b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AU
index 8c20ebf..ecd6757 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AU
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AU
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BS b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BS
index d1a31b0..2c30b61 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BS
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BS
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_DE b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_DE
index 82b22fb..0c78534 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_DE
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_DE
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GB b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GB
index 1d2b408..1cbd1f3 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GB
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GB
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_IT b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_IT
index 3cc5f04..a75f0db 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_IT
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_IT
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_JP b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_JP
index 7887d32..f1c9af5 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_JP
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_JP
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_KR b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_KR
index 7c2b942..7f29bca 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_KR
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_KR
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_MX b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_MX
index 5857b91..7f1e18b 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_MX
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_MX
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_NZ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_NZ
index e330135..5a494e6 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_NZ
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_NZ
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_PL b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_PL
index 0fd0d27..424909c 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_PL
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_PL
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_RE b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_RE
index 6ec64af..77a8f8f 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_RE
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_RE
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_SG b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_SG
index 0836187..0838f55 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_SG
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_SG
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_US b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_US
index 3db0e26..9e6ba69 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_US
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_US
Binary files differ
diff --git a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_YT b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_YT
index b9da104..50db378 100644
--- a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_YT
+++ b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_YT
Binary files differ