• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!-- Copyright (C) 2009 The Libphonenumber Authors
2
3     Licensed under the Apache License, Version 2.0 (the "License");
4     you may not use this file except in compliance with the License.
5     You may obtain a copy of the License at
6
7     http://www.apache.org/licenses/LICENSE-2.0
8
9     Unless required by applicable law or agreed to in writing, software
10     distributed under the License is distributed on an "AS IS" BASIS,
11     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12     See the License for the specific language governing permissions and
13     limitations under the License.
14
15     @author: Shaopeng Jia
16
17     Metadata on Phone Number Plan and formatting rules. This file is used
18     solely for the purpose of unittesting, so data in this file is not
19     necessarily consistent with that of PhoneNumberMetadata.xml.
20-->
21
22<phoneNumberMetadata>
23  <territories>
24    <!-- Andorra -->
25    <territory id="AD" countryCode="376" internationalPrefix="00">
26      <generalDesc>
27        <nationalNumberPattern>\d{6}</nationalNumberPattern>
28      </generalDesc>
29      <fixedLine>
30        <nationalNumberPattern>\d{6}</nationalNumberPattern>
31        <possibleLengths national="6"/>
32        <exampleNumber>123456</exampleNumber>
33      </fixedLine>
34    </territory>
35
36    <!-- United Arab Emirates -->
37    <!-- Added since when formatting the number for mobile dialling we have special rules to handle
38         it. -->
39    <territory id="AE" countryCode="971" internationalPrefix="00">
40      <generalDesc>
41        <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern>
42      </generalDesc>
43      <uan>
44        <nationalNumberPattern>600\d{6}</nationalNumberPattern>
45        <possibleLengths national="9"/>
46        <exampleNumber>600123456</exampleNumber>
47      </uan>
48    </territory>
49
50    <!-- Armenia -->
51    <!-- Added to test same mobile and fixed-line in custom builds. -->
52    <territory id="AM" countryCode="374" internationalPrefix="00"
53               nationalPrefix="0">
54      <generalDesc>
55        <nationalNumberPattern>[1-9]\d{7}</nationalNumberPattern>
56      </generalDesc>
57      <fixedLine>
58        <nationalNumberPattern>[1-9]\d{7}</nationalNumberPattern>
59        <possibleLengths national="8" localOnly="5,6"/>
60        <exampleNumber>10123456</exampleNumber>
61      </fixedLine>
62      <mobile>
63        <nationalNumberPattern>[1-9]\d{7}</nationalNumberPattern>
64        <possibleLengths national="8" localOnly="5,6"/>
65        <exampleNumber>10123456</exampleNumber>
66      </mobile>
67    </territory>
68
69    <!-- Angola -->
70    <!-- This country has been coopted to test the case of a national prefix with a non-numeric
71         symbol in it. It is also useful since it has no national prefix formatting rule. -->
72    <territory id="AO" countryCode="244" internationalPrefix="00" nationalPrefix="0~0">
73      <availableFormats>
74        <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
75          <format>$1 $2 $3</format>
76        </numberFormat>
77      </availableFormats>
78      <generalDesc>
79        <nationalNumberPattern>[29]\d{8}</nationalNumberPattern>
80      </generalDesc>
81      <fixedLine>
82        <nationalNumberPattern>2\d(?:[26-9]\d|\d[26-9])\d{5}</nationalNumberPattern>
83        <possibleLengths national="9"/>
84        <exampleNumber>222123456</exampleNumber>
85      </fixedLine>
86      <mobile>
87        <!-- Expanded the 92 prefix possibilities to match numbers found online. -->
88        <nationalNumberPattern>9[1-3]\d{7}</nationalNumberPattern>
89        <possibleLengths national="9"/>
90        <exampleNumber>923123456</exampleNumber>
91      </mobile>
92    </territory>
93
94    <!-- Argentina -->
95    <territory id="AR" countryCode="54" internationalPrefix="00"
96               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"
97               nationalPrefixForParsing="0(?:(11|343|3715)15)?"
98               nationalPrefixTransformRule="9$1">
99      <!-- Note in nationalPrefixForParsing, the areacode (such as 11, 343, etc.), when present in
100           front of carrier selection code 15, is captured to replace $1 in
101           nationalPrefixTransformRule -->
102      <availableFormats>
103        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
104          <leadingDigits>11</leadingDigits>
105          <format>$1 $2-$3</format>
106        </numberFormat>
107        <numberFormat pattern="(\d{4})(\d{2})(\d{4})">
108          <leadingDigits>1[02-9]|[23]</leadingDigits>
109          <format>$1 $2-$3</format>
110        </numberFormat>
111        <numberFormat pattern="(\d)(\d{2})(\d{4})(\d{4})">
112          <leadingDigits>911</leadingDigits>
113          <format>$2 15 $3-$4</format>
114          <intlFormat>$1 $2 $3 $4</intlFormat>
115        </numberFormat>
116        <numberFormat pattern="(\d)(\d{4})(\d{2})(\d{4})"
117          carrierCodeFormattingRule="$NP$FG $CC">
118          <leadingDigits>9(?:1[02-9]|[23])</leadingDigits>
119          <format>$2 $3-$4</format>
120          <intlFormat>$1 $2 $3 $4</intlFormat>
121        </numberFormat>
122        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
123          <leadingDigits>[68]</leadingDigits>
124          <format>$1-$2-$3</format>
125        </numberFormat>
126      </availableFormats>
127      <generalDesc>
128        <nationalNumberPattern>[1-3689]\d{9,10}</nationalNumberPattern>
129      </generalDesc>
130      <fixedLine>
131        <nationalNumberPattern>[1-3]\d{5,9}</nationalNumberPattern>
132        <possibleLengths national="[6-10]"/>
133        <exampleNumber>1234567890</exampleNumber>
134      </fixedLine>
135      <mobile>
136        <nationalNumberPattern>9\d{10}|[1-3]\d{9}</nationalNumberPattern>
137        <possibleLengths national="10,11"/>
138        <exampleNumber>9234567890</exampleNumber>
139      </mobile>
140      <tollFree>
141        <nationalNumberPattern>80\d{8}</nationalNumberPattern>
142        <possibleLengths national="10"/>
143        <exampleNumber>8034567890</exampleNumber>
144      </tollFree>
145      <premiumRate>
146        <nationalNumberPattern>6(0\d|10)\d{7}</nationalNumberPattern>
147        <possibleLengths national="10"/>
148        <exampleNumber>6234567890</exampleNumber>
149      </premiumRate>
150    </territory>
151
152    <!-- Australia -->
153    <!-- Country calling code shared with Cocos Islands (CC) and Christmas Islands (CX) -->
154    <territory id="AU" countryCode="61" internationalPrefix="001[12]"
155               nationalPrefix="0" preferredInternationalPrefix="0011"
156               nationalPrefixFormattingRule="$NP$FG">
157      <availableFormats>
158        <numberFormat nationalPrefixFormattingRule="$FG"
159          pattern="(\d{4})(\d{3})(\d{3})" >
160          <leadingDigits>1</leadingDigits>
161          <format>$1 $2 $3</format>
162        </numberFormat>
163        <numberFormat pattern="(\d)(\d{4})(\d{4})">
164          <leadingDigits>[2-478]</leadingDigits>
165          <format>$1 $2 $3</format>
166        </numberFormat>
167      </availableFormats>
168      <generalDesc >
169        <nationalNumberPattern>[1-578]\d{4,14}</nationalNumberPattern>
170      </generalDesc>
171      <fixedLine>
172        <nationalNumberPattern>[2378]\d{8}</nationalNumberPattern>
173        <possibleLengths national="9"/>
174        <exampleNumber>212345678</exampleNumber>
175      </fixedLine>
176      <mobile>
177        <nationalNumberPattern>4\d{8}</nationalNumberPattern>
178        <possibleLengths national="9"/>
179        <exampleNumber>412345678</exampleNumber>
180      </mobile>
181      <tollFree>
182        <nationalNumberPattern>1800\d{6}</nationalNumberPattern>
183        <possibleLengths national="10"/>
184        <exampleNumber>1800123456</exampleNumber>
185      </tollFree>
186      <premiumRate>
187        <nationalNumberPattern>190[0126]\d{6}</nationalNumberPattern>
188        <possibleLengths national="10"/>
189        <exampleNumber>1900123456</exampleNumber>
190      </premiumRate>
191    </territory>
192
193    <!-- Barbados -->
194    <territory id="BB" countryCode="1" internationalPrefix="011">
195      <generalDesc>
196        <nationalNumberPattern>246\d{7}</nationalNumberPattern>
197      </generalDesc>
198      <fixedLine>
199        <possibleLengths national="10" localOnly="7"/>
200        <exampleNumber>2464567890</exampleNumber>
201      </fixedLine>
202    </territory>
203
204    <!-- Brazil -->
205    <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be
206         recognised by the library. It is also used for formatInOriginalFormat tests, so some length
207         metadata is needed. -->
208    <territory id="BR" countryCode="55" internationalPrefix="00">
209      <generalDesc>
210        <nationalNumberPattern>\d{8,10}</nationalNumberPattern>
211      </generalDesc>
212      <fixedLine>
213        <nationalNumberPattern>\d{8,10}</nationalNumberPattern>
214        <possibleLengths national="10" localOnly="8"/>
215        <exampleNumber>12345678</exampleNumber>
216      </fixedLine>
217    </territory>
218
219    <!-- Bahamas -->
220    <territory id="BS" countryCode="1" internationalPrefix="011"
221               nationalPrefix="1">
222      <generalDesc>
223        <nationalNumberPattern>(242|8(00|66|77|88)|900)\d{7}</nationalNumberPattern>
224      </generalDesc>
225      <fixedLine>
226        <nationalNumberPattern>
227          242(?:
228            3(?:
229              02|
230              [236][1-9]|
231              4[0-24-9]|
232              5[0-68]|
233              7[3-57]|
234              9[2-5]
235            )|
236            4(?:
237              2[237]|
238              51|
239              64|
240              77
241            )|
242            502|
243            636|
244            702
245          )\d{4}
246        </nationalNumberPattern>
247        <possibleLengths national="10" localOnly="7"/>
248        <exampleNumber>2425027890</exampleNumber>
249      </fixedLine>
250      <mobile>
251        <nationalNumberPattern>242(357|359|457|557)\d{4}</nationalNumberPattern>
252        <possibleLengths national="10"/>
253        <exampleNumber>2423577890</exampleNumber>
254      </mobile>
255      <tollFree>
256        <nationalNumberPattern>8(00|66|77|88)\d{7}</nationalNumberPattern>
257        <possibleLengths national="10"/>
258        <exampleNumber>8001234567</exampleNumber>
259      </tollFree>
260      <premiumRate>
261        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
262        <possibleLengths national="10"/>
263        <exampleNumber>9001234567</exampleNumber>
264      </premiumRate>
265    </territory>
266
267    <!-- Belarus -->
268    <!-- This country has been coopted to test the case of a national prefix formatting rule with a
269         space in it and the case where a number happens to begin with the national prefix, but
270         would become too short if the prefix is stripped. -->
271    <territory id="BY" countryCode="375" internationalPrefix="810" nationalPrefix="8"
272               nationalPrefixForParsing="80?|99999" nationalPrefixFormattingRule="$NP $FG">
273      <availableFormats>
274        <!-- We make some bogus formatting templates that differ only in length to check that
275             switching formatting patterns works as expected.-->
276        <numberFormat pattern="(\d{4})">
277          <leadingDigits>[1-8]</leadingDigits>
278          <format>$1</format>
279        </numberFormat>
280        <!-- This pattern has an override to remove the space after the national prefix. -->
281        <numberFormat pattern="(\d{2})(\d{3})" nationalPrefixFormattingRule="$NP$FG">
282          <leadingDigits>[1-8]</leadingDigits>
283          <format>$1 $2</format>
284        </numberFormat>
285        <numberFormat pattern="(\d{3})(\d{3})">
286          <leadingDigits>[1-8]</leadingDigits>
287          <format>$1 $2</format>
288        </numberFormat>
289      </availableFormats>
290      <generalDesc>
291        <!-- This numbering plan is completely bogus, but is used to test the AYTF logic. For that
292             reason, it is kept very simple. -->
293        <nationalNumberPattern>[1-9]\d{5}</nationalNumberPattern>
294      </generalDesc>
295      <fixedLine>
296        <nationalNumberPattern>[1-9]\d{5}</nationalNumberPattern>
297        <possibleLengths national="6"/>
298        <exampleNumber>112345</exampleNumber>
299      </fixedLine>
300    </territory>
301
302    <!-- Canada -->
303    <territory id="CA" countryCode="1" internationalPrefix="011">
304      <generalDesc>
305        <nationalNumberPattern>226\d{7}</nationalNumberPattern>
306      </generalDesc>
307      <fixedLine>
308        <nationalNumberPattern>226\d{7}</nationalNumberPattern>
309        <possibleLengths national="10" localOnly="7"/>
310        <exampleNumber>2261234567</exampleNumber>
311      </fixedLine>
312    </territory>
313
314    <!-- Cocos Islands -->
315    <!-- Country calling code shared with Australia. -->
316    <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be
317         recognised by the library, and some length information is needed for parsing. -->
318    <territory id="CC" countryCode="61" internationalPrefix="00">
319      <generalDesc>
320        <nationalNumberPattern>\d{6,10}</nationalNumberPattern>
321      </generalDesc>
322      <fixedLine>
323        <nationalNumberPattern>\d{6,10}</nationalNumberPattern>
324        <possibleLengths national="10" localOnly="6"/>
325        <exampleNumber>2261234567</exampleNumber>
326      </fixedLine>
327    </territory>
328
329    <!-- China -->
330    <!-- Used to test as-you-type-formatter with complicated number format patterns. Also used to
331         test that not all geographical mobile numbers have an area code. -->
332    <territory id="CN" countryCode="86" internationalPrefix="00" nationalPrefix="0">
333      <availableFormats>
334        <numberFormat nationalPrefixFormattingRule="$NP$FG" pattern="(\d{3})(\d{5,6})"
335                      carrierCodeFormattingRule="$CC $FG">
336          <leadingDigits>[3-9]</leadingDigits>
337          <leadingDigits>[3-9]\d{2}[19]</leadingDigits>
338          <leadingDigits>
339            [3-9]\d{2}(?:
340              10|
341              95
342            )
343          </leadingDigits>
344          <format>$1 $2</format>
345        </numberFormat>
346        <!-- Note that mobile numbers do not get formatted with the national prefix. -->
347        <numberFormat nationalPrefixFormattingRule="$FG" pattern="(\d{3})(\d{8})">
348          <leadingDigits>1</leadingDigits>
349          <format>$1 $2</format>
350        </numberFormat>
351      </availableFormats>
352      <generalDesc>
353        <nationalNumberPattern>
354          [1-7]\d{6,11}|
355          8[0-357-9]\d{6,9}|
356          9\d{7,10}
357        </nationalNumberPattern>
358      </generalDesc>
359      <fixedLine>
360        <nationalNumberPattern>[2-9]\d{10}</nationalNumberPattern>
361        <possibleLengths national="11"/>
362        <exampleNumber>91234567</exampleNumber>
363      </fixedLine>
364      <mobile>
365        <nationalNumberPattern>
366          1(?:
367            [38]\d|
368            4[57]|
369            5[0-35-9]|
370            7[0136-8]
371          )\d{8}
372        </nationalNumberPattern>
373        <possibleLengths national="11"/>
374        <exampleNumber>13123456789</exampleNumber>
375      </mobile>
376    </territory>
377
378    <!-- Christmas Islands -->
379    <!-- Country calling code shared with Australia. -->
380    <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be
381         recognised by the library, and some length information is needed for parsing. -->
382    <territory id="CX" countryCode="61" internationalPrefix="00">
383      <generalDesc>
384        <nationalNumberPattern>\d{8,10}</nationalNumberPattern>
385      </generalDesc>
386      <fixedLine>
387        <nationalNumberPattern>\d{8,10}</nationalNumberPattern>
388        <possibleLengths national="10" localOnly="8"/>
389        <exampleNumber>2261234567</exampleNumber>
390      </fixedLine>
391    </territory>
392
393    <!-- Germany -->
394    <territory id="DE" countryCode="49" internationalPrefix="00"
395               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
396      <availableFormats>
397        <numberFormat pattern="(\d{3})(\d{3,8})">
398          <leadingDigits>2|3[3-9]|906|[4-9][1-9]1</leadingDigits>
399          <format>$1 $2</format>
400        </numberFormat>
401        <numberFormat pattern="(\d{2})(\d{4,11})">
402          <leadingDigits>[34]0|[68]9</leadingDigits>
403          <format>$1/$2</format>
404        </numberFormat>
405        <!-- Extra fictional pattern for shorter numbers with the same prefixes as the following
406             pattern, to illustrate the problem the AYTF has with real patterns that share this
407             property. -->
408        <numberFormat pattern="(\d{2})(\d{2})">
409          <leadingDigits>[4-9]</leadingDigits>
410          <leadingDigits>[4-6]|[7-9](?:\d[1-9]|[1-9]\d)</leadingDigits>
411          <format>$1 $2</format>
412        </numberFormat>
413        <numberFormat pattern="(\d{4})(\d{2,7})">
414          <leadingDigits>[4-9]</leadingDigits>
415          <leadingDigits>[4-6]|[7-9](?:\d[1-9]|[1-9]\d)</leadingDigits>
416          <format>$1 $2</format>
417        </numberFormat>
418        <numberFormat pattern="(\d{3})(\d{1})(\d{6})">
419          <leadingDigits>800</leadingDigits>
420          <format>$1 $2 $3</format>
421        </numberFormat>
422        <numberFormat pattern="(\d{3})(\d{3,4})(\d{4})">
423          <leadingDigits>900</leadingDigits>
424          <format>$1 $2 $3</format>
425        </numberFormat>
426      </availableFormats>
427      <generalDesc>
428        <nationalNumberPattern>\d{4,14}</nationalNumberPattern>
429      </generalDesc>
430      <fixedLine>
431        <nationalNumberPattern>
432          (?:
433            [24-6]\d{2}|
434            3[03-9]\d|
435            [789](?:
436              0[2-9]|
437              [1-9]\d
438            )
439          )\d{1,8}
440        </nationalNumberPattern>
441        <possibleLengths national="[4-11]" localOnly="2,3"/>
442        <exampleNumber>30123456</exampleNumber>
443      </fixedLine>
444      <mobile>
445        <nationalNumberPattern>1(5\d{9}|7\d{8}|6[02]\d{8}|63\d{7})</nationalNumberPattern>
446        <possibleLengths national="10,11"/>
447        <exampleNumber>15123456789</exampleNumber>
448      </mobile>
449      <tollFree>
450        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
451        <possibleLengths national="10"/>
452        <exampleNumber>8001234567</exampleNumber>
453      </tollFree>
454      <premiumRate>
455        <nationalNumberPattern>900([135]\d{6}|9\d{7})</nationalNumberPattern>
456        <possibleLengths national="10,11"/>
457        <exampleNumber>9001234567</exampleNumber>
458      </premiumRate>
459    </territory>
460
461    <!-- France -->
462    <territory id="FR" countryCode="33" nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"
463               internationalPrefix="00">
464      <availableFormats>
465        <!-- We use this to test the phone number matcher. For our test-case, the formatting
466             pattern must have as the first group a sub-part of the country calling code,
467             and have a national prefix. This corresponds to the test number +33 3 34 2312. -->
468        <numberFormat pattern="(\d)(\d{2})(\d{2})(\d{2})">
469          <leadingDigits>3</leadingDigits>
470          <format>$1 $2 $3 $4</format>
471        </numberFormat>
472      </availableFormats>
473      <generalDesc>
474        <nationalNumberPattern>3\d{6}</nationalNumberPattern>
475      </generalDesc>
476      <fixedLine>
477        <nationalNumberPattern>3\d{6}</nationalNumberPattern>
478        <possibleLengths national="7"/>
479        <exampleNumber>3123456</exampleNumber>
480      </fixedLine>
481    </territory>
482
483    <!-- United Kingdom -->
484    <territory id="GB" countryCode="44" internationalPrefix="00"
485               nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)"
486               mobileNumberPortableRegion="true">
487      <availableFormats>
488        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
489          <leadingDigits>[1-59]|[78]0</leadingDigits>
490          <format>$1 $2 $3</format>
491        </numberFormat>
492        <numberFormat pattern="(\d)(\d{3})(\d{3})(\d{3})">
493          <leadingDigits>6</leadingDigits>
494          <format>$1 $2 $3 $4</format>
495        </numberFormat>
496        <numberFormat pattern="(\d{4})(\d{3})(\d{3})">
497          <leadingDigits>7[1-57-9]</leadingDigits>
498          <format>$1 $2 $3</format>
499        </numberFormat>
500        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
501          <leadingDigits>8[47]</leadingDigits>
502          <format>$1 $2 $3</format>
503        </numberFormat>
504      </availableFormats>
505      <generalDesc>
506        <nationalNumberPattern>\d{10}</nationalNumberPattern>
507      </generalDesc>
508      <fixedLine>
509        <nationalNumberPattern>[1-6]\d{9}</nationalNumberPattern>
510        <possibleLengths national="9,10" localOnly="6,7,8"/>
511        <exampleNumber>3123456789</exampleNumber>
512      </fixedLine>
513      <mobile>
514        <nationalNumberPattern>7[1-57-9]\d{8}</nationalNumberPattern>
515        <possibleLengths national="10"/>
516        <exampleNumber>7123456789</exampleNumber>
517      </mobile>
518      <pager>
519        <nationalNumberPattern>76\d{8}</nationalNumberPattern>
520        <possibleLengths national="10"/>
521        <exampleNumber>7623456789</exampleNumber>
522      </pager>
523      <tollFree>
524        <nationalNumberPattern>80\d{8}</nationalNumberPattern>
525        <possibleLengths national="10"/>
526        <exampleNumber>8023456789</exampleNumber>
527      </tollFree>
528      <premiumRate>
529        <nationalNumberPattern>9[018]\d{8}</nationalNumberPattern>
530        <possibleLengths national="10"/>
531        <exampleNumber>9023456789</exampleNumber>
532      </premiumRate>
533      <sharedCost>
534        <nationalNumberPattern>8(?:4[3-5]|7[0-2])\d{7}</nationalNumberPattern>
535        <possibleLengths national="10"/>
536        <exampleNumber>8433456789</exampleNumber>
537      </sharedCost>
538      <voip>
539        <nationalNumberPattern>56\d{8}</nationalNumberPattern>
540        <possibleLengths national="10"/>
541        <exampleNumber>5633456789</exampleNumber>
542      </voip>
543      <personalNumber>
544        <nationalNumberPattern>70\d{8}</nationalNumberPattern>
545        <possibleLengths national="10"/>
546        <exampleNumber>7033456789</exampleNumber>
547      </personalNumber>
548    </territory>
549
550    <!-- Guernsey -->
551    <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be
552         recognised by the library, and it must be the same as that of the United Kingdom. -->
553    <territory id="GG" countryCode="44" internationalPrefix="00">
554      <generalDesc>
555        <nationalNumberPattern>\d{6,10}</nationalNumberPattern>
556      </generalDesc>
557      <fixedLine>
558        <nationalNumberPattern>\d{6,10}</nationalNumberPattern>
559        <possibleLengths national="10" localOnly="6"/>
560        <exampleNumber>7033456789</exampleNumber>
561      </fixedLine>
562    </territory>
563
564    <!-- Italy -->
565    <!-- http://en.wikipedia.org/wiki/%2B39 -->
566    <territory id="IT" countryCode="39" internationalPrefix="00">
567      <availableFormats>
568        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
569          <leadingDigits>0[26]</leadingDigits>
570          <format>$1 $2 $3</format>
571        </numberFormat>
572        <numberFormat pattern="(\d{3})(\d{4})(\d{3,4})">
573          <leadingDigits>0[13-57-9]</leadingDigits>
574          <format>$1 $2 $3</format>
575        </numberFormat>
576        <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})">
577          <leadingDigits>3</leadingDigits>
578          <format>$1 $2 $3</format>
579        </numberFormat>
580        <numberFormat pattern="(\d{3})(\d{3,6})">
581          <leadingDigits>8</leadingDigits>
582          <format>$1 $2</format>
583        </numberFormat>
584      </availableFormats>
585      <generalDesc>
586        <nationalNumberPattern>[0389]\d{5,10}</nationalNumberPattern>
587      </generalDesc>
588      <fixedLine>
589        <nationalNumberPattern>0\d{9,10}</nationalNumberPattern>
590        <possibleLengths national="10,11"/>
591        <exampleNumber>0123456789</exampleNumber>
592      </fixedLine>
593      <mobile>
594        <nationalNumberPattern>3\d{8,9}</nationalNumberPattern>
595        <possibleLengths national="9,10"/>
596        <exampleNumber>3123456789</exampleNumber>
597      </mobile>
598      <tollFree>
599        <nationalNumberPattern>80(?:0\d{6}|3\d{3})</nationalNumberPattern>
600        <possibleLengths national="6,9"/>
601        <exampleNumber>800123456</exampleNumber>
602      </tollFree>
603      <premiumRate>
604        <nationalNumberPattern>89(?:2\d{3}|9\d{6})</nationalNumberPattern>
605        <possibleLengths national="6,9"/>
606        <exampleNumber>892123</exampleNumber>
607      </premiumRate>
608    </territory>
609
610    <!-- Japan -->
611    <!-- The metadata here is added to unit test AsYouTypeFormatter for JP, which requires switching
612         patterns as digits beyond the third one are entered. As a result, only a few fake
613         formatting rules are added. -->
614    <territory id="JP" countryCode="81" internationalPrefix="010"
615               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
616      <availableFormats>
617        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
618          <leadingDigits>[57-9]0</leadingDigits>
619          <format>$1 $2 $3</format>
620        </numberFormat>
621        <numberFormat pattern="(\d{2})(\d{2})(\d{3})(\d{4})">
622          <leadingDigits>[57-9]0</leadingDigits>
623          <format>$1 $2 $3 $4</format>
624        </numberFormat>
625        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
626          <leadingDigits>111|222|333</leadingDigits>
627          <leadingDigits>(?:111|222|333)1</leadingDigits>
628          <leadingDigits>(?:111|222|333)11</leadingDigits>
629          <format>$1 $2 $3</format>
630        </numberFormat>
631        <numberFormat pattern="(\d{4})(\d)(\d{4})">
632          <leadingDigits>222|333</leadingDigits>
633          <leadingDigits>2221|3332</leadingDigits>
634          <leadingDigits>22212|3332</leadingDigits>
635          <leadingDigits>222120|3332</leadingDigits>
636          <format>$1 $2 $3</format>
637        </numberFormat>
638        <numberFormat pattern="(\d{3})(\d{2})(\d{4})">
639          <leadingDigits>[23]</leadingDigits>
640          <format>$1 $2 $3</format>
641        </numberFormat>
642        <numberFormat pattern="(\d{3})(\d{4})">
643          <leadingDigits>077</leadingDigits>
644          <format>$1-$2</format>
645        </numberFormat>
646        <!-- The following numberFormat is added to test that the format containing the star sign is
647             not used by the AYTF. -->
648        <numberFormat nationalPrefixFormattingRule="$FG" pattern="(\d{4})">
649          <leadingDigits>[23]</leadingDigits>
650          <format>*$1</format>
651        </numberFormat>
652      </availableFormats>
653      <noInternationalDialling>
654        <nationalNumberPattern>[23]\d{3}</nationalNumberPattern>
655        <possibleLengths national="4"/>
656        <exampleNumber>2123</exampleNumber>
657      </noInternationalDialling>
658      <generalDesc>
659        <nationalNumberPattern>07\d{5}|[1-357-9]\d{3,10}</nationalNumberPattern>
660      </generalDesc>
661      <fixedLine>
662        <nationalNumberPattern>07\d{5}|[1-357-9]\d{3,10}</nationalNumberPattern>
663        <possibleLengths national="[4-11]"/>
664        <exampleNumber>0712345</exampleNumber>
665      </fixedLine>
666      <tollFree>
667        <nationalNumberPattern>0777[01]\d{2}</nationalNumberPattern>
668        <possibleLengths national="7"/>
669        <exampleNumber>0777012</exampleNumber>
670      </tollFree>
671    </territory>
672
673    <!-- Korea (Rep. of) -->
674    <!-- http://www.itu.int/oth/T0202000072/en -->
675    <!-- http://en.wikipedia.org/wiki/%2B82 -->
676    <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boardId=1074&boardSeq=2349 -->
677    <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boardId=1074&boardSeq=2240 -->
678    <!-- http://www.telecentro.co.kr/sub/index.php?job=detail&ebcf_id=faq&page=1&mid=0503&eb_seq=36 -->
679    <!-- Exceptions :
680        internationalPrefix
681            0031, 0033, 0071, 0073 - Special services of KT and DACOM, ignorable
682        nationalPrefix
683            1[4-6]XX-YYYY - Country-wide common number services, display as it is without hyphens -->
684    <territory id="KR" countryCode="82" internationalPrefix="00(?:[124-68]|[37]\d{2})"
685               nationalPrefix="0" nationalPrefixForParsing="0(8[1-46-8]|85\d{2})?"
686               nationalPrefixFormattingRule="$NP$FG">
687      <availableFormats>
688        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
689          <leadingDigits>1(?:0|1[19]|[69]9|5[458])|[57]0</leadingDigits>
690          <leadingDigits>1(?:0|1[19]|[69]9|5(?:44|59|8))|[57]0</leadingDigits>
691          <format>$1-$2-$3</format>
692        </numberFormat>
693        <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
694          <leadingDigits>1(?:[169][2-8]|[78]|5[1-4])|[68]0|[3-6][1-9][2-9]</leadingDigits>
695          <leadingDigits>1(?:[169][2-8]|[78]|5(?:[1-3]|4[56]))|[68]0|[3-6][1-9][2-9]</leadingDigits>
696          <format>$1-$2-$3</format>
697        </numberFormat>
698        <numberFormat pattern="(\d{3})(\d)(\d{4})">
699          <leadingDigits>131</leadingDigits>
700          <leadingDigits>1312</leadingDigits>
701          <format>$1-$2-$3</format>
702        </numberFormat>
703        <numberFormat pattern="(\d{3})(\d{2})(\d{4})">
704          <leadingDigits>131</leadingDigits>
705          <leadingDigits>131[13-9]</leadingDigits>
706          <format>$1-$2-$3</format>
707        </numberFormat>
708        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
709          <leadingDigits>13[2-9]</leadingDigits>
710          <format>$1-$2-$3</format>
711        </numberFormat>
712        <numberFormat pattern="(\d{2})(\d{2})(\d{3})(\d{4})">
713          <leadingDigits>30</leadingDigits>
714          <format>$1-$2-$3-$4</format>
715        </numberFormat>
716        <numberFormat pattern="(\d)(\d{4})(\d{4})">
717          <leadingDigits>2(?:[26]|3[0-467])</leadingDigits>
718          <leadingDigits>2(?:[26]|3(?:01|1[45]|2[17-9]|39|4|6[67]|7[078]))</leadingDigits>
719          <format>$1-$2-$3</format>
720        </numberFormat>
721        <numberFormat pattern="(\d)(\d{3})(\d{4})">
722          <leadingDigits>2(?:3[0-35-9]|[457-9])</leadingDigits>
723          <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>
724          <format>$1-$2-$3</format>
725        </numberFormat>
726        <numberFormat pattern="(\d)(\d{3})">
727          <leadingDigits>21[0-46-9]</leadingDigits>
728          <leadingDigits>21(?:[0-247-9]|3[124]|6[1269])</leadingDigits>
729          <format>$1-$2</format>
730        </numberFormat>
731        <numberFormat pattern="(\d)(\d{4})">
732          <leadingDigits>21[36]</leadingDigits>
733          <leadingDigits>21(?:3[035-9]|6[03-578])</leadingDigits>
734          <format>$1-$2</format>
735        </numberFormat>
736        <numberFormat pattern="(\d{2})(\d{3})">
737          <leadingDigits>[3-6][1-9]1</leadingDigits>
738          <leadingDigits>[3-6][1-9]1(?:[0-46-9])</leadingDigits>
739          <leadingDigits>[3-6][1-9]1(?:[0-247-9]|3[124]|6[1269])</leadingDigits>
740          <format>$1-$2</format>
741        </numberFormat>
742        <numberFormat pattern="(\d{2})(\d{4})">
743          <leadingDigits>[3-6][1-9]1</leadingDigits>
744          <leadingDigits>[3-6][1-9]1[36]</leadingDigits>
745          <leadingDigits>[3-6][1-9]1(?:3[035-9]|6[03-578])</leadingDigits>
746          <format>$1-$2</format>
747        </numberFormat>
748      </availableFormats>
749      <generalDesc>
750        <nationalNumberPattern>[1-7]\d{3,9}|8\d{8}</nationalNumberPattern>
751      </generalDesc>
752      <fixedLine>
753        <nationalNumberPattern>(?:2|[34][1-3]|5[1-5]|6[1-4])(?:1\d{2,3}|[2-9]\d{6,7})</nationalNumberPattern>
754        <possibleLengths national="[4-10]"/>
755        <exampleNumber>22123456</exampleNumber>
756      </fixedLine>
757      <mobile>
758        <nationalNumberPattern>1[0-25-9]\d{7,8}</nationalNumberPattern>
759        <possibleLengths national="9,10"/>
760        <exampleNumber>1023456789</exampleNumber>
761      </mobile>
762      <tollFree>
763        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
764        <possibleLengths national="9"/>
765        <exampleNumber>801234567</exampleNumber>
766      </tollFree>
767      <premiumRate>
768        <nationalNumberPattern>60[2-9]\d{6}</nationalNumberPattern>
769        <possibleLengths national="9"/>
770        <exampleNumber>602345678</exampleNumber>
771      </premiumRate>
772      <personalNumber>
773        <nationalNumberPattern>50\d{8}</nationalNumberPattern>
774        <possibleLengths national="10"/>
775        <exampleNumber>5012345678</exampleNumber>
776      </personalNumber>
777      <voip>
778        <nationalNumberPattern>70\d{8}</nationalNumberPattern>
779        <possibleLengths national="10"/>
780        <exampleNumber>7012345678</exampleNumber>
781      </voip>
782    </territory>
783
784    <!-- Mexico -->
785    <territory id="MX" countryCode="52" internationalPrefix="00"
786               nationalPrefix="01" nationalPrefixForParsing="01|04[45](\d{10})"
787               nationalPrefixTransformRule="1$1" nationalPrefixFormattingRule="$NP $FG"
788               nationalPrefixOptionalWhenFormatting="true">
789      <availableFormats>
790        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
791          <leadingDigits>[89]00</leadingDigits>
792          <format>$1 $2 $3</format>
793        </numberFormat>
794        <!-- This formatting pattern is added to test that the AYTF should return unformatted
795             results when the first group is dropped in the output. -->
796        <numberFormat pattern="(\d{3})(\d{2})(\d{5})">
797          <leadingDigits>901</leadingDigits>
798          <format>$2 $3</format>
799          <intlFormat>$2 $3</intlFormat>
800        </numberFormat>
801        <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
802          <leadingDigits>33|55|81</leadingDigits>
803          <format>$1 $2 $3</format>
804        </numberFormat>
805        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
806          <leadingDigits>[2467]|3[0-24-9]|5[0-46-9]|8[2-9]|9[1-9]</leadingDigits>
807          <format>$1 $2 $3</format>
808        </numberFormat>
809        <numberFormat nationalPrefixFormattingRule="$FG" pattern="(\d)(\d{2})(\d{4})(\d{4})">
810          <leadingDigits>1(?:33|55|81)</leadingDigits>
811          <format>045 $2 $3 $4</format>
812          <intlFormat>$1 $2 $3 $4</intlFormat>
813        </numberFormat>
814        <numberFormat nationalPrefixFormattingRule="$FG" pattern="(\d)(\d{3})(\d{3})(\d{4})">
815          <leadingDigits>1(?:[124579]|3[0-24-9]|5[0-46-9]|8[02-9])</leadingDigits>
816          <format>045 $2 $3 $4</format>
817          <intlFormat>$1 $2 $3 $4</intlFormat>
818        </numberFormat>
819      </availableFormats>
820      <generalDesc>
821        <nationalNumberPattern>[1-9]\d{9,10}</nationalNumberPattern>
822      </generalDesc>
823      <fixedLine>
824        <nationalNumberPattern>[2-9]\d{9}</nationalNumberPattern>
825        <possibleLengths national="10" localOnly="7"/>
826        <exampleNumber>2123456789</exampleNumber>
827      </fixedLine>
828      <mobile>
829        <nationalNumberPattern>1\d{10}</nationalNumberPattern>
830        <possibleLengths national="11"/>
831        <exampleNumber>11234567890</exampleNumber>
832      </mobile>
833      <tollFree>
834        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
835        <possibleLengths national="10"/>
836        <exampleNumber>8001234567</exampleNumber>
837      </tollFree>
838      <premiumRate>
839        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
840        <possibleLengths national="10"/>
841        <exampleNumber>9001234567</exampleNumber>
842      </premiumRate>
843    </territory>
844
845    <!-- New Zealand -->
846    <territory id="NZ" countryCode="64" internationalPrefix="00"
847               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
848      <availableFormats>
849        <numberFormat pattern="(\d)(\d{3})(\d{4})">
850          <leadingDigits>24|[34679]</leadingDigits>
851          <format>$1-$2 $3</format>
852        </numberFormat>
853        <numberFormat pattern="(\d)(\d{3})(\d{3,5})">
854          <leadingDigits>2[179]</leadingDigits>
855          <format>$1-$2 $3</format>
856        </numberFormat>
857        <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})">
858          <leadingDigits>[89]</leadingDigits>
859          <format>$1 $2 $3</format>
860        </numberFormat>
861      </availableFormats>
862      <generalDesc>
863        <nationalNumberPattern>
864          [289]\d{7,9}|
865          [3-7]\d{7}
866        </nationalNumberPattern>
867      </generalDesc>
868      <fixedLine>
869        <nationalNumberPattern>24099\d{3}|(?:3[2-79]|[479][2-689]|6[235-9])\d{6}</nationalNumberPattern>
870        <possibleLengths national="7,8"/>
871        <exampleNumber>24099123</exampleNumber>
872      </fixedLine>
873      <mobile>
874        <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>
875        <possibleLengths national="[8-10]"/>
876        <exampleNumber>201234567</exampleNumber>
877      </mobile>
878      <tollFree>
879        <nationalNumberPattern>800\d{6,7}</nationalNumberPattern>
880        <possibleLengths national="9,10"/>
881        <exampleNumber>8001234567</exampleNumber>
882      </tollFree>
883      <premiumRate>
884        <nationalNumberPattern>900\d{6,7}</nationalNumberPattern>
885        <possibleLengths national="9,10"/>
886        <exampleNumber>9001234567</exampleNumber>
887      </premiumRate>
888    </territory>
889
890    <!-- Poland -->
891    <!-- http://en.wikipedia.org/wiki/%2B48 -->
892    <territory id="PL" countryCode="48" internationalPrefix="00"
893               nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
894      <availableFormats>
895        <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})">
896          <format>$1 $2 $3 $4</format>
897        </numberFormat>
898      </availableFormats>
899      <generalDesc>
900        <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern>
901      </generalDesc>
902      <mobile>
903        <nationalNumberPattern>(?:5[01]|6[069]|7[289]|88)\d{7}</nationalNumberPattern>
904        <possibleLengths national="9"/>
905        <exampleNumber>501234567</exampleNumber>
906      </mobile>
907      <tollFree>
908        <nationalNumberPattern>800\d{6}</nationalNumberPattern>
909        <possibleLengths national="9"/>
910        <exampleNumber>800123456</exampleNumber>
911      </tollFree>
912      <premiumRate>
913        <nationalNumberPattern>70\d{7}</nationalNumberPattern>
914        <possibleLengths national="9"/>
915        <exampleNumber>701234567</exampleNumber>
916      </premiumRate>
917    </territory>
918
919    <!-- Réunion (French Departments and Territories in the Indian Ocean) -->
920    <!-- Note this shares the same country code as La Mayotte and French
921    Southern Territories, and the formatting patterns here are used by all of
922    them. This is present to test leadingDigits. -->
923    <territory id="RE" countryCode="262" leadingDigits="262|6(?:9[23]|47)|8"
924               internationalPrefix="00" nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
925      <availableFormats>
926        <numberFormat pattern="(\d{3})(\d{2})(\d{2})(\d{2})">
927          <format>$1 $2 $3 $4</format>
928        </numberFormat>
929      </availableFormats>
930      <generalDesc>
931        <nationalNumberPattern>[268]\d{8}</nationalNumberPattern>
932      </generalDesc>
933      <fixedLine>
934        <!-- 0876 numbers are mentioned in the plan, but none in use can be
935        found. -->
936        <nationalNumberPattern>262\d{6}</nationalNumberPattern>
937        <possibleLengths national="9"/>
938        <exampleNumber>262161234</exampleNumber>
939      </fixedLine>
940      <mobile>
941        <nationalNumberPattern>6(?:9[23]|47)\d{6}</nationalNumberPattern>
942        <possibleLengths national="9"/>
943        <exampleNumber>692123456</exampleNumber>
944      </mobile>
945      <!-- 08* Numbers in Réunion are the same as those valid in France. -->
946      <tollFree>
947        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
948        <possibleLengths national="9"/>
949        <exampleNumber>801234567</exampleNumber>
950      </tollFree>
951      <premiumRate>
952        <nationalNumberPattern>8(?:1[01]|2[0156]|84|9[0-37-9])\d{6}</nationalNumberPattern>
953        <possibleLengths national="9"/>
954        <exampleNumber>810123456</exampleNumber>
955      </premiumRate>
956    </territory>
957
958    <!-- Russian Federation -->
959    <territory id="RU" countryCode="7" internationalPrefix="810" nationalPrefix="8"
960               nationalPrefixFormattingRule="$NP ($FG)" nationalPrefixOptionalWhenFormatting="true">
961      <generalDesc>
962        <nationalNumberPattern>[347-9]\d{9}</nationalNumberPattern>
963      </generalDesc>
964      <fixedLine>
965        <possibleLengths national="10"/>
966        <exampleNumber>3011234567</exampleNumber>
967        <nationalNumberPattern>[348]\d{9}</nationalNumberPattern>
968      </fixedLine>
969      <mobile>
970        <possibleLengths national="10"/>
971        <exampleNumber>9123456789</exampleNumber>
972        <nationalNumberPattern>9\d{9}</nationalNumberPattern>
973      </mobile>
974    </territory>
975
976    <!-- Sweden -->
977    <territory id="SE" countryCode="46" internationalPrefix="00">
978      <generalDesc>
979        <nationalNumberPattern>\d{9}</nationalNumberPattern>
980      </generalDesc>
981      <fixedLine>
982        <possibleLengths national="9"/>
983        <exampleNumber>123456789</exampleNumber>
984      </fixedLine>
985    </territory>
986
987    <!-- Singapore -->
988    <!-- http://www.ida.gov.sg/policies%20and%20regulation/20060508120124.aspx -->
989    <!-- For testing the AYTF with long NDDs, "777777" is added as a possible national prefix. -->
990    <territory id="SG" countryCode="65" internationalPrefix="0[0-3][0-9]"
991               nationalPrefixForParsing="777777">
992      <availableFormats>
993        <numberFormat pattern="(\d{4})(\d{4})">
994          <leadingDigits>[369]|8[1-9]</leadingDigits>
995          <format>$1 $2</format>
996        </numberFormat>
997        <numberFormat pattern="(\d{4})(\d{3})(\d{4})">
998          <leadingDigits>1[89]</leadingDigits>
999          <format>$1 $2 $3</format>
1000        </numberFormat>
1001        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
1002          <leadingDigits>800</leadingDigits>
1003          <format>$1 $2 $3</format>
1004        </numberFormat>
1005      </availableFormats>
1006      <generalDesc>
1007        <nationalNumberPattern>[13689]\d{7,10}</nationalNumberPattern>
1008      </generalDesc>
1009      <fixedLine>
1010        <nationalNumberPattern>[36]\d{7}</nationalNumberPattern>
1011        <possibleLengths national="8"/>
1012        <exampleNumber>31234567</exampleNumber>
1013      </fixedLine>
1014      <mobile>
1015        <nationalNumberPattern>[89]\d{7}</nationalNumberPattern>
1016        <possibleLengths national="8"/>
1017        <exampleNumber>81234567</exampleNumber>
1018      </mobile>
1019      <tollFree>
1020        <nationalNumberPattern>1?800\d{7}</nationalNumberPattern>
1021        <possibleLengths national="10,11"/>
1022        <exampleNumber>8001234567</exampleNumber>
1023      </tollFree>
1024      <premiumRate>
1025        <nationalNumberPattern>1900\d{7}</nationalNumberPattern>
1026        <possibleLengths national="11"/>
1027        <exampleNumber>19001234567</exampleNumber>
1028      </premiumRate>
1029    </territory>
1030
1031    <!-- Tristan da Cunha -->
1032    <!-- Added this country, which in real life has no mobile numbers, to test
1033         isPossibleNumberForType for the case where the fixed-line and mobile lengths are different,
1034         there is a hole in the middle, and the type FIXED_LINE_OR_MOBILE is passed in. Also added
1035         tollFree to test that this doesn't influence things. -->
1036    <territory id="TA" countryCode="290" internationalPrefix="00">
1037      <generalDesc>
1038        <nationalNumberPattern>8\d{3,7}</nationalNumberPattern>
1039      </generalDesc>
1040      <fixedLine>
1041        <nationalNumberPattern>8\d{5}</nationalNumberPattern>
1042        <possibleLengths national="6"/>
1043        <exampleNumber>812345</exampleNumber>
1044      </fixedLine>
1045      <mobile>
1046        <nationalNumberPattern>8\d{3}</nationalNumberPattern>
1047        <possibleLengths national="4"/>
1048        <exampleNumber>8123</exampleNumber>
1049      </mobile>
1050      <tollFree>
1051        <nationalNumberPattern>8\d{7}</nationalNumberPattern>
1052        <possibleLengths national="8"/>
1053        <exampleNumber>81234567</exampleNumber>
1054      </tollFree>
1055    </territory>
1056
1057    <!-- United States -->
1058    <!-- http://www.nanpa.com/reports/reports_npa.html -->
1059    <!-- For testing purposes, numbers starting with 24 are not considered US numbers.-->
1060    <territory id="US" countryCode="1" internationalPrefix="011"
1061               preferredExtnPrefix=" extn. " nationalPrefix="1"
1062               mainCountryForCode="true" mobileNumberPortableRegion="true">
1063      <availableFormats>
1064        <numberFormat pattern="(\d{3})(\d{4})">
1065          <format>$1 $2</format>
1066          <intlFormat>NA</intlFormat>
1067       </numberFormat>
1068        <numberFormat pattern="(\d{3})(\d{3})(\d{4})" nationalPrefixOptionalWhenFormatting="true">
1069          <format>$1 $2 $3</format>
1070        </numberFormat>
1071      </availableFormats>
1072      <generalDesc>
1073        <!-- Numbers beginning with 7 are excluded for testing purposes only. -->
1074        <nationalNumberPattern>[13-689]\d{9}|2[0-35-9]\d{8}</nationalNumberPattern>
1075      </generalDesc>
1076      <fixedLine>
1077        <nationalNumberPattern>[13-689]\d{9}|2[0-35-9]\d{8}</nationalNumberPattern>
1078        <possibleLengths national="10" localOnly="7"/>
1079        <exampleNumber>1234567890</exampleNumber>
1080      </fixedLine>
1081      <mobile>
1082        <nationalNumberPattern>[13-689]\d{9}|2[0-35-9]\d{8}</nationalNumberPattern>
1083        <possibleLengths national="10" localOnly="7"/>
1084        <exampleNumber>1234567890</exampleNumber>
1085      </mobile>
1086      <noInternationalDialling>
1087        <!-- This range is added for testing purposes only. -->
1088        <nationalNumberPattern>800\d{7}</nationalNumberPattern>
1089        <possibleLengths national="10"/>
1090        <exampleNumber>8004567890</exampleNumber>
1091      </noInternationalDialling>
1092      <tollFree>
1093        <nationalNumberPattern>8(?:00|66|77|88)\d{7}</nationalNumberPattern>
1094        <possibleLengths national="10"/>
1095        <exampleNumber>8004567890</exampleNumber>
1096      </tollFree>
1097      <premiumRate>
1098        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
1099        <possibleLengths national="10"/>
1100        <exampleNumber>9004567890</exampleNumber>
1101      </premiumRate>
1102    </territory>
1103
1104    <!-- Uzbekistan -->
1105    <territory id="UZ" countryCode="998" preferredInternationalPrefix="8~10"
1106               internationalPrefix="810" nationalPrefix="8" nationalPrefixFormattingRule="$NP $FG">
1107      <availableFormats>
1108        <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})">
1109          <leadingDigits>[679]</leadingDigits>
1110          <format>$1 $2 $3 $4</format>
1111        </numberFormat>
1112      </availableFormats>
1113      <generalDesc>
1114        <nationalNumberPattern>[69]\d{8}</nationalNumberPattern>
1115      </generalDesc>
1116      <fixedLine>
1117        <possibleLengths national="9" localOnly="7"/>
1118        <exampleNumber>662345678</exampleNumber>
1119        <nationalNumberPattern>6122\d{5}</nationalNumberPattern>
1120      </fixedLine>
1121      <mobile>
1122        <possibleLengths national="9"/>
1123        <exampleNumber>912345678</exampleNumber>
1124        <nationalNumberPattern>9[0-57-9]\d{7}</nationalNumberPattern>
1125      </mobile>
1126    </territory>
1127
1128    <!-- Mayotte -->
1129    <territory id="YT" countryCode="262" leadingDigits="269|639"
1130               internationalPrefix="00" nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
1131      <!-- Formatting as per La Réunion. -->
1132      <generalDesc>
1133        <nationalNumberPattern>[268]\d{8}</nationalNumberPattern>
1134      </generalDesc>
1135      <fixedLine>
1136        <nationalNumberPattern>2696[0-4]\d{4}</nationalNumberPattern>
1137        <possibleLengths national="9"/>
1138        <exampleNumber>269601234</exampleNumber>
1139      </fixedLine>
1140      <mobile>
1141        <nationalNumberPattern>639\d{6}</nationalNumberPattern>
1142        <possibleLengths national="9"/>
1143        <exampleNumber>639123456</exampleNumber>
1144      </mobile>
1145      <!-- Same as in France. -->
1146      <tollFree>
1147        <nationalNumberPattern>80\d{7}</nationalNumberPattern>
1148        <possibleLengths national="9"/>
1149        <exampleNumber>801234567</exampleNumber>
1150      </tollFree>
1151    </territory>
1152
1153    <!-- International Toll Free numbers  -->
1154    <territory id="001" countryCode="800">
1155      <availableFormats>
1156        <numberFormat pattern="(\d{4})(\d{4})">
1157          <format>$1 $2</format>
1158        </numberFormat>
1159      </availableFormats>
1160      <generalDesc>
1161        <nationalNumberPattern>\d{8}</nationalNumberPattern>
1162      </generalDesc>
1163      <tollFree>
1164        <nationalNumberPattern>\d{8}</nationalNumberPattern>
1165        <possibleLengths national="8"/>
1166        <exampleNumber>12345678</exampleNumber>
1167      </tollFree>
1168    </territory>
1169
1170    <!-- A non-geographical entity which we declare as having no fixed-line, but some mobile
1171         numbers. -->
1172    <territory id="001" countryCode="882">
1173      <availableFormats>
1174        <numberFormat pattern="(\d)(\d{4})(\d{4})">
1175          <format>$1 $2 $3</format>
1176        </numberFormat>
1177      </availableFormats>
1178      <generalDesc>
1179        <nationalNumberPattern>\d{9}</nationalNumberPattern>
1180      </generalDesc>
1181      <mobile>
1182        <nationalNumberPattern>\d{9}</nationalNumberPattern>
1183        <possibleLengths national="9"/>
1184        <exampleNumber>123456789</exampleNumber>
1185      </mobile>
1186    </territory>
1187
1188    <!-- Universal International Preium Rate Number -->
1189    <territory id="001" countryCode="979">
1190      <availableFormats>
1191        <numberFormat pattern="(\d)(\d{4})(\d{4})">
1192          <format>$1 $2 $3</format>
1193        </numberFormat>
1194      </availableFormats>
1195      <generalDesc>
1196        <nationalNumberPattern>\d{9}</nationalNumberPattern>
1197      </generalDesc>
1198      <premiumRate>
1199        <nationalNumberPattern>\d{9}</nationalNumberPattern>
1200        <possibleLengths national="9"/>
1201        <exampleNumber>123456789</exampleNumber>
1202      </premiumRate>
1203    </territory>
1204  </territories>
1205</phoneNumberMetadata>
1206