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 </territory> 27 28 <!-- United Arab Emirates --> 29 <!-- Added since when formatting the number for mobile dialling we have special rules to handle 30 it. --> 31 <territory id="AE" countryCode="971" internationalPrefix="00"> 32 <generalDesc> 33 <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern> 34 <possibleNumberPattern>\d{9}</possibleNumberPattern> 35 </generalDesc> 36 <uan> 37 <nationalNumberPattern>600\d{6}</nationalNumberPattern> 38 <exampleNumber>600123456</exampleNumber> 39 </uan> 40 </territory> 41 42 <!-- Angola --> 43 <!-- This country has been coopted to test the case of a national prefix with a non-numeric 44 symbol in it. It is also useful since it has no national prefix formatting rule. --> 45 <territory id="AO" countryCode="244" internationalPrefix="00" nationalPrefix="0~0"> 46 <availableFormats> 47 <numberFormat pattern="(\d{3})(\d{3})(\d{3})"> 48 <format>$1 $2 $3</format> 49 </numberFormat> 50 </availableFormats> 51 <generalDesc> 52 <nationalNumberPattern>[29]\d{8}</nationalNumberPattern> 53 <possibleNumberPattern>\d{9}</possibleNumberPattern> 54 </generalDesc> 55 <fixedLine> 56 <nationalNumberPattern>2\d(?:[26-9]\d|\d[26-9])\d{5}</nationalNumberPattern> 57 <exampleNumber>222123456</exampleNumber> 58 </fixedLine> 59 <mobile> 60 <!-- Expanded the 92 prefix possibilities to match numbers found online. --> 61 <nationalNumberPattern>9[1-3]\d{7}</nationalNumberPattern> 62 <exampleNumber>923123456</exampleNumber> 63 </mobile> 64 </territory> 65 66 <!-- Argentina --> 67 <territory id="AR" countryCode="54" internationalPrefix="00" 68 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG" 69 nationalPrefixForParsing="0(?:(11|343|3715)15)?" 70 nationalPrefixTransformRule="9$1"> 71 <!-- Note in nationalPrefixForParsing, the areacode (such as 11, 343, etc.), when present in 72 front of carrier selection code 15, is captured to replace $1 in 73 nationalPrefixTransformRule --> 74 <availableFormats> 75 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 76 <leadingDigits>11</leadingDigits> 77 <format>$1 $2-$3</format> 78 </numberFormat> 79 <numberFormat pattern="(\d{4})(\d{2})(\d{4})"> 80 <leadingDigits>1[02-9]|[23]</leadingDigits> 81 <format>$1 $2-$3</format> 82 </numberFormat> 83 <numberFormat pattern="(9)(11)(\d{4})(\d{4})"> 84 <leadingDigits>911</leadingDigits> 85 <format>$2 15 $3-$4</format> 86 <intlFormat>$1 $2 $3 $4</intlFormat> 87 </numberFormat> 88 <numberFormat pattern="(9)(\d{4})(\d{2})(\d{4})" 89 carrierCodeFormattingRule="$NP$FG $CC"> 90 <leadingDigits>9(?:1[02-9]|[23])</leadingDigits> 91 <format>$2 $3-$4</format> 92 <intlFormat>$1 $2 $3 $4</intlFormat> 93 </numberFormat> 94 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 95 <leadingDigits>[68]</leadingDigits> 96 <format>$1-$2-$3</format> 97 </numberFormat> 98 </availableFormats> 99 <generalDesc> 100 <nationalNumberPattern>[1-3689]\d{9,10}</nationalNumberPattern> 101 <possibleNumberPattern>\d{6,11}</possibleNumberPattern> 102 </generalDesc> 103 <fixedLine> 104 <nationalNumberPattern>[1-3]\d{9}</nationalNumberPattern> 105 <possibleNumberPattern>\d{6,10}</possibleNumberPattern> 106 </fixedLine> 107 <mobile> 108 <nationalNumberPattern>9\d{10}|[1-3]\d{9}</nationalNumberPattern> 109 <possibleNumberPattern>\d{10,11}</possibleNumberPattern> 110 </mobile> 111 <tollFree> 112 <nationalNumberPattern>80\d{8}</nationalNumberPattern> 113 <possibleNumberPattern>\d{10}</possibleNumberPattern> 114 </tollFree> 115 <premiumRate> 116 <nationalNumberPattern>6(0\d|10)\d{7}</nationalNumberPattern> 117 <possibleNumberPattern>\d{10}</possibleNumberPattern> 118 </premiumRate> 119 </territory> 120 121 <!-- Australia --> 122 <territory id="AU" countryCode="61" internationalPrefix="001[12]" 123 nationalPrefix="0" preferredInternationalPrefix="0011" 124 nationalPrefixFormattingRule="$NP$FG"> 125 <availableFormats> 126 <numberFormat nationalPrefixFormattingRule="$FG" 127 pattern="(\d{4})(\d{3})(\d{3})" > 128 <leadingDigits>1</leadingDigits> 129 <format>$1 $2 $3</format> 130 </numberFormat> 131 <numberFormat pattern="(\d{1})(\d{4})(\d{4})"> 132 <leadingDigits>[2-478]</leadingDigits> 133 <format>$1 $2 $3</format> 134 </numberFormat> 135 </availableFormats> 136 <generalDesc > 137 <nationalNumberPattern>[1-578]\d{4,14}</nationalNumberPattern> 138 <possibleNumberPattern>\d{5,15}</possibleNumberPattern> 139 </generalDesc> 140 <fixedLine> 141 <nationalNumberPattern>[2378]\d{8}</nationalNumberPattern> 142 <possibleNumberPattern>\d{9}</possibleNumberPattern> 143 </fixedLine> 144 <mobile> 145 <nationalNumberPattern>4\d{8}</nationalNumberPattern> 146 <possibleNumberPattern>\d{9}</possibleNumberPattern> 147 </mobile> 148 <tollFree> 149 <nationalNumberPattern>1800\d{6}</nationalNumberPattern> 150 <possibleNumberPattern>\d{10}</possibleNumberPattern> 151 </tollFree> 152 <premiumRate> 153 <nationalNumberPattern>190[0126]\d{6}</nationalNumberPattern> 154 <possibleNumberPattern>\d{10}</possibleNumberPattern> 155 </premiumRate> 156 </territory> 157 158 <!-- Brazil --> 159 <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be 160 recognised by the library. --> 161 <territory id="BR" countryCode="55"> 162 </territory> 163 164 <!-- Bahamas --> 165 <territory id="BS" countryCode="1" internationalPrefix="011" 166 nationalPrefix="1"> 167 <generalDesc> 168 <nationalNumberPattern>(242|8(00|66|77|88)|900)\d{7}</nationalNumberPattern> 169 <possibleNumberPattern>\d{7,10}</possibleNumberPattern> 170 </generalDesc> 171 <fixedLine> 172 <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> 173 </fixedLine> 174 <mobile> 175 <nationalNumberPattern>242(357|359|457|557)\d{4}</nationalNumberPattern> 176 <possibleNumberPattern>\d{10}</possibleNumberPattern> 177 </mobile> 178 <tollFree> 179 <nationalNumberPattern>8(00|66|77|88)\d{7}</nationalNumberPattern> 180 <possibleNumberPattern>\d{10}</possibleNumberPattern> 181 </tollFree> 182 <premiumRate> 183 <nationalNumberPattern>900\d{7}</nationalNumberPattern> 184 <possibleNumberPattern>\d{10}</possibleNumberPattern> 185 </premiumRate> 186 </territory> 187 188 <!-- Belarus --> 189 <!-- This country has been coopted to test the case of a national prefix formatting rule with a 190 space in it. --> 191 <territory id="BY" countryCode="375" internationalPrefix="810" nationalPrefix="8" 192 nationalPrefixForParsing="80?|99999" nationalPrefixFormattingRule="$NP $FG"> 193 <availableFormats> 194 <!-- We make some bogus formatting templates that differ only in length to check that 195 switching formatting patterns works as expected.--> 196 <numberFormat pattern="(\d{4})"> 197 <leadingDigits>[1-8]</leadingDigits> 198 <format>$1</format> 199 </numberFormat> 200 <!-- This pattern has an override to remove the space after the national prefix. --> 201 <numberFormat pattern="(\d{2})(\d{3})" nationalPrefixFormattingRule="$NP$FG"> 202 <leadingDigits>[1-8]</leadingDigits> 203 <format>$1 $2</format> 204 </numberFormat> 205 <numberFormat pattern="(\d{3})(\d{3})"> 206 <leadingDigits>[1-8]</leadingDigits> 207 <format>$1 $2</format> 208 </numberFormat> 209 </availableFormats> 210 <generalDesc> 211 <!-- This numbering plan is completely bogus, but is used to test the AYTF logic. For that 212 reason, it is kept very simple. --> 213 <nationalNumberPattern>[1-9]\d{5}</nationalNumberPattern> 214 <possibleNumberPattern>\d{6}</possibleNumberPattern> 215 </generalDesc> 216 <fixedLine> 217 <exampleNumber>112345</exampleNumber> 218 </fixedLine> 219 </territory> 220 221 <!-- France --> 222 <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be 223 recognised by the library. --> 224 <territory id="FR" countryCode="33"> 225 </territory> 226 227 <!-- Germany --> 228 <territory id="DE" countryCode="49" internationalPrefix="00" 229 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 230 <availableFormats> 231 <numberFormat pattern="(\d{3})(\d{3,8})"> 232 <leadingDigits>2|3[3-9]|906|[4-9][1-9]1</leadingDigits> 233 <format>$1 $2</format> 234 </numberFormat> 235 <numberFormat pattern="(\d{2})(\d{4,11})"> 236 <leadingDigits>[34]0|[68]9</leadingDigits> 237 <format>$1/$2</format> 238 </numberFormat> 239 <!-- Extra fictional pattern for shorter numbers with the same prefixes as the following 240 pattern, to illustrate the problem the AYTF has with real patterns that share this 241 property. --> 242 <numberFormat pattern="([4-9]\d)(\d{2})"> 243 <leadingDigits>[4-9]</leadingDigits> 244 <leadingDigits>[4-6]|[7-9](?:\d[1-9]|[1-9]\d)</leadingDigits> 245 <format>$1 $2</format> 246 </numberFormat> 247 <numberFormat pattern="([4-9]\d{3})(\d{2,7})"> 248 <leadingDigits>[4-9]</leadingDigits> 249 <leadingDigits>[4-6]|[7-9](?:\d[1-9]|[1-9]\d)</leadingDigits> 250 <format>$1 $2</format> 251 </numberFormat> 252 <numberFormat pattern="(\d{3})(\d{1})(\d{6})"> 253 <leadingDigits>800</leadingDigits> 254 <format>$1 $2 $3</format> 255 </numberFormat> 256 <numberFormat pattern="(\d{3})(\d{3,4})(\d{4})"> 257 <leadingDigits>900</leadingDigits> 258 <format>$1 $2 $3</format> 259 </numberFormat> 260 </availableFormats> 261 <generalDesc> 262 <nationalNumberPattern>\d{4,14}</nationalNumberPattern> 263 <possibleNumberPattern>\d{2,14}</possibleNumberPattern> 264 </generalDesc> 265 <fixedLine> 266 <nationalNumberPattern>(?:[24-6]\d{2}|3[03-9]\d|[789](?:[1-9]\d|0[2-9]))\d{1,8}</nationalNumberPattern> 267 <exampleNumber>30123456</exampleNumber> 268 </fixedLine> 269 <mobile> 270 <nationalNumberPattern>1(5\d{9}|7\d{8}|6[02]\d{8}|63\d{7})</nationalNumberPattern> 271 <possibleNumberPattern>\d{10,11}</possibleNumberPattern> 272 </mobile> 273 <tollFree> 274 <nationalNumberPattern>800\d{7}</nationalNumberPattern> 275 <possibleNumberPattern>\d{10}</possibleNumberPattern> 276 </tollFree> 277 <premiumRate> 278 <nationalNumberPattern>900([135]\d{6}|9\d{7})</nationalNumberPattern> 279 <possibleNumberPattern>\d{10,11}</possibleNumberPattern> 280 </premiumRate> 281 </territory> 282 283 <!-- United Kingdom --> 284 <territory id="GB" countryCode="44" internationalPrefix="00" 285 nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)" 286 mobileNumberPortableRegion="true"> 287 <availableFormats> 288 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 289 <leadingDigits>[1-59]|[78]0</leadingDigits> 290 <format>$1 $2 $3</format> 291 </numberFormat> 292 <numberFormat pattern="(\d)(\d{3})(\d{3})(\d{3})"> 293 <leadingDigits>6</leadingDigits> 294 <format>$1 $2 $3 $4</format> 295 </numberFormat> 296 <numberFormat pattern="(\d{4})(\d{3})(\d{3})"> 297 <leadingDigits>7[1-57-9]</leadingDigits> 298 <format>$1 $2 $3</format> 299 </numberFormat> 300 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 301 <leadingDigits>8[47]</leadingDigits> 302 <format>$1 $2 $3</format> 303 </numberFormat> 304 </availableFormats> 305 <generalDesc> 306 <nationalNumberPattern>\d{10}</nationalNumberPattern> 307 <possibleNumberPattern>\d{6,10}</possibleNumberPattern> 308 </generalDesc> 309 <fixedLine> 310 <nationalNumberPattern>[1-6]\d{9}</nationalNumberPattern> 311 </fixedLine> 312 <mobile> 313 <nationalNumberPattern>7[1-57-9]\d{8}</nationalNumberPattern> 314 <possibleNumberPattern>\d{10}</possibleNumberPattern> 315 </mobile> 316 <tollFree> 317 <nationalNumberPattern>80\d{8}</nationalNumberPattern> 318 <possibleNumberPattern>\d{10}</possibleNumberPattern> 319 </tollFree> 320 <premiumRate> 321 <nationalNumberPattern>9[018]\d{8}</nationalNumberPattern> 322 <possibleNumberPattern>\d{10}</possibleNumberPattern> 323 </premiumRate> 324 <sharedCost> 325 <nationalNumberPattern>8(?:4[3-5]|7[0-2])\d{7}</nationalNumberPattern> 326 <possibleNumberPattern>\d{10}</possibleNumberPattern> 327 </sharedCost> 328 <voip> 329 <nationalNumberPattern>56\d{8}</nationalNumberPattern> 330 <possibleNumberPattern>\d{10}</possibleNumberPattern> 331 </voip> 332 <personalNumber> 333 <nationalNumberPattern>70\d{8}</nationalNumberPattern> 334 <possibleNumberPattern>\d{10}</possibleNumberPattern> 335 </personalNumber> 336 </territory> 337 338 <!-- Guernsey --> 339 <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be 340 recognised by the library, and it must be the same as that of the United Kingdom. --> 341 <territory id="GG" countryCode="44"> 342 </territory> 343 344 <!-- Italy --> 345 <!-- http://en.wikipedia.org/wiki/%2B39 --> 346 <territory id="IT" countryCode="39" internationalPrefix="00" leadingZeroPossible="true"> 347 <availableFormats> 348 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 349 <leadingDigits>0[26]</leadingDigits> 350 <format>$1 $2 $3</format> 351 </numberFormat> 352 <numberFormat pattern="(\d{3})(\d{4})(\d{3,4})"> 353 <leadingDigits>0[13-57-9]</leadingDigits> 354 <format>$1 $2 $3</format> 355 </numberFormat> 356 <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})"> 357 <leadingDigits>3</leadingDigits> 358 <format>$1 $2 $3</format> 359 </numberFormat> 360 <numberFormat pattern="(\d{3})(\d{3,6})"> 361 <leadingDigits>8</leadingDigits> 362 <format>$1 $2</format> 363 </numberFormat> 364 </availableFormats> 365 <generalDesc> 366 <nationalNumberPattern>[0389]\d{5,10}</nationalNumberPattern> 367 <possibleNumberPattern>\d{6,11}</possibleNumberPattern> 368 </generalDesc> 369 <fixedLine> 370 <nationalNumberPattern>0\d{9,10}</nationalNumberPattern> 371 <possibleNumberPattern>\d{10,11}</possibleNumberPattern> 372 </fixedLine> 373 <mobile> 374 <nationalNumberPattern>3\d{8,9}</nationalNumberPattern> 375 <possibleNumberPattern>\d{9,10}</possibleNumberPattern> 376 </mobile> 377 <tollFree> 378 <nationalNumberPattern>80(?:0\d{6}|3\d{3})</nationalNumberPattern> 379 <possibleNumberPattern>\d{6,9}</possibleNumberPattern> 380 </tollFree> 381 <premiumRate> 382 <nationalNumberPattern>89(?:2\d{3}|9\d{6})</nationalNumberPattern> 383 <possibleNumberPattern>\d{6,9}</possibleNumberPattern> 384 </premiumRate> 385 </territory> 386 387 <!-- Japan --> 388 <!-- The metadata here is added to unit test AsYouTypeFormatter for JP, which requires switching 389 patterns as digits beyond the third one are entered. As a result, only a few fake 390 formatting rules are added. --> 391 <territory id="JP" countryCode="81" internationalPrefix="010" 392 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG" leadingZeroPossible="true"> 393 <availableFormats> 394 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 395 <leadingDigits>[57-9]0</leadingDigits> 396 <format>$1 $2 $3</format> 397 </numberFormat> 398 <numberFormat pattern="(\d{2})(\d{2})(\d{3})(\d{4})"> 399 <leadingDigits>[57-9]0</leadingDigits> 400 <format>$1 $2 $3 $4</format> 401 </numberFormat> 402 <numberFormat pattern="(\d{2})(\d{3})(\d{4})"> 403 <leadingDigits>111|222|333</leadingDigits> 404 <leadingDigits>(?:111|222|333)1</leadingDigits> 405 <leadingDigits>(?:111|222|333)11</leadingDigits> 406 <format>$1 $2 $3</format> 407 </numberFormat> 408 <numberFormat pattern="(\d{4})(\d)(\d{4})"> 409 <leadingDigits>222|333</leadingDigits> 410 <leadingDigits>2221|3332</leadingDigits> 411 <leadingDigits>22212|3332</leadingDigits> 412 <leadingDigits>222120|3332</leadingDigits> 413 <format>$1 $2 $3</format> 414 </numberFormat> 415 <numberFormat pattern="(\d{3})(\d{2})(\d{4})"> 416 <leadingDigits>[23]</leadingDigits> 417 <format>$1 $2 $3</format> 418 </numberFormat> 419 <numberFormat pattern="(\d{3})(\d{4})"> 420 <leadingDigits>077</leadingDigits> 421 <format>$1-$2</format> 422 </numberFormat> 423 <!-- The following numberFormat is added to test that the format containing the star sign is 424 not used by the AYTF. --> 425 <numberFormat nationalPrefixFormattingRule="$FG" pattern="(\d{4})"> 426 <leadingDigits>[23]</leadingDigits> 427 <format>*$1</format> 428 </numberFormat> 429 </availableFormats> 430 <noInternationalDialling> 431 <nationalNumberPattern>[23]\d{3}</nationalNumberPattern> 432 <possibleNumberPattern>\d{4}</possibleNumberPattern> 433 </noInternationalDialling> 434 <generalDesc> 435 <nationalNumberPattern>07\d{5}|[1-357-9]\d{3,10}</nationalNumberPattern> 436 <possibleNumberPattern>\d{4,11}</possibleNumberPattern> 437 </generalDesc> 438 <tollFree> 439 <nationalNumberPattern>0777[01]\d{2}</nationalNumberPattern> 440 <possibleNumberPattern>\d{7}</possibleNumberPattern> 441 <exampleNumber>0777012</exampleNumber> 442 </tollFree> 443 </territory> 444 445 <!-- Korea (Rep. of) --> 446 <!-- http://www.itu.int/oth/T0202000072/en --> 447 <!-- http://en.wikipedia.org/wiki/%2B82 --> 448 <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boardId=1074&boardSeq=2349 --> 449 <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boardId=1074&boardSeq=2240 --> 450 <!-- http://www.telecentro.co.kr/sub/index.php?job=detail&ebcf_id=faq&page=1&mid=0503&eb_seq=36 --> 451 <!-- Exceptions : 452 internationalPrefix 453 0031, 0033, 0071, 0073 - Special services of KT and DACOM, ignorable 454 nationalPrefix 455 1[4-6]XX-YYYY - Country-wide common number services, display as it is without hyphens --> 456 <territory id="KR" countryCode="82" internationalPrefix="00(?:[124-68]|[37]\d{2})" 457 nationalPrefix="0" nationalPrefixForParsing="0(8[1-46-8]|85\d{2})?" 458 nationalPrefixFormattingRule="$NP$FG"> 459 <availableFormats> 460 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 461 <leadingDigits>1(?:0|1[19]|[69]9|5[458])|[57]0</leadingDigits> 462 <leadingDigits>1(?:0|1[19]|[69]9|5(?:44|59|8))|[57]0</leadingDigits> 463 <format>$1-$2-$3</format> 464 </numberFormat> 465 <numberFormat pattern="(\d{2})(\d{3})(\d{4})"> 466 <leadingDigits>1(?:[169][2-8]|[78]|5[1-4])|[68]0|[3-6][1-9][2-9]</leadingDigits> 467 <leadingDigits>1(?:[169][2-8]|[78]|5(?:[1-3]|4[56]))|[68]0|[3-6][1-9][2-9]</leadingDigits> 468 <format>$1-$2-$3</format> 469 </numberFormat> 470 <numberFormat pattern="(\d{3})(\d)(\d{4})"> 471 <leadingDigits>131</leadingDigits> 472 <leadingDigits>1312</leadingDigits> 473 <format>$1-$2-$3</format> 474 </numberFormat> 475 <numberFormat pattern="(\d{3})(\d{2})(\d{4})"> 476 <leadingDigits>131</leadingDigits> 477 <leadingDigits>131[13-9]</leadingDigits> 478 <format>$1-$2-$3</format> 479 </numberFormat> 480 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 481 <leadingDigits>13[2-9]</leadingDigits> 482 <format>$1-$2-$3</format> 483 </numberFormat> 484 <numberFormat pattern="(\d{2})(\d{2})(\d{3})(\d{4})"> 485 <leadingDigits>30</leadingDigits> 486 <format>$1-$2-$3-$4</format> 487 </numberFormat> 488 <numberFormat pattern="(\d)(\d{4})(\d{4})"> 489 <leadingDigits>2(?:[26]|3[0-467])</leadingDigits> 490 <leadingDigits>2(?:[26]|3(?:01|1[45]|2[17-9]|39|4|6[67]|7[078]))</leadingDigits> 491 <format>$1-$2-$3</format> 492 </numberFormat> 493 <numberFormat pattern="(\d)(\d{3})(\d{4})"> 494 <leadingDigits>2(?:3[0-35-9]|[457-9])</leadingDigits> 495 <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> 496 <format>$1-$2-$3</format> 497 </numberFormat> 498 <numberFormat pattern="(\d)(\d{3})"> 499 <leadingDigits>21[0-46-9]</leadingDigits> 500 <leadingDigits>21(?:[0-247-9]|3[124]|6[1269])</leadingDigits> 501 <format>$1-$2</format> 502 </numberFormat> 503 <numberFormat pattern="(\d)(\d{4})"> 504 <leadingDigits>21[36]</leadingDigits> 505 <leadingDigits>21(?:3[035-9]|6[03-578])</leadingDigits> 506 <format>$1-$2</format> 507 </numberFormat> 508 <numberFormat pattern="(\d{2})(\d{3})"> 509 <leadingDigits>[3-6][1-9]1</leadingDigits> 510 <leadingDigits>[3-6][1-9]1(?:[0-46-9])</leadingDigits> 511 <leadingDigits>[3-6][1-9]1(?:[0-247-9]|3[124]|6[1269])</leadingDigits> 512 <format>$1-$2</format> 513 </numberFormat> 514 <numberFormat pattern="(\d{2})(\d{4})"> 515 <leadingDigits>[3-6][1-9]1</leadingDigits> 516 <leadingDigits>[3-6][1-9]1[36]</leadingDigits> 517 <leadingDigits>[3-6][1-9]1(?:3[035-9]|6[03-578])</leadingDigits> 518 <format>$1-$2</format> 519 </numberFormat> 520 </availableFormats> 521 <generalDesc> 522 <nationalNumberPattern>[1-7]\d{3,9}|8\d{8}</nationalNumberPattern> 523 <possibleNumberPattern>\d{4,10}</possibleNumberPattern> 524 </generalDesc> 525 <fixedLine> 526 <nationalNumberPattern>(?:2|[34][1-3]|5[1-5]|6[1-4])(?:1\d{2,3}|[2-9]\d{6,7})</nationalNumberPattern> 527 <possibleNumberPattern>\d{4,10}</possibleNumberPattern> 528 <exampleNumber>22123456</exampleNumber> 529 </fixedLine> 530 <mobile> 531 <nationalNumberPattern>1[0-25-9]\d{7,8}</nationalNumberPattern> 532 <possibleNumberPattern>\d{9,10}</possibleNumberPattern> 533 <exampleNumber>1023456789</exampleNumber> 534 </mobile> 535 <tollFree> 536 <nationalNumberPattern>80\d{7}</nationalNumberPattern> 537 <possibleNumberPattern>\d{9}</possibleNumberPattern> 538 <exampleNumber>801234567</exampleNumber> 539 </tollFree> 540 <premiumRate> 541 <nationalNumberPattern>60[2-9]\d{6}</nationalNumberPattern> 542 <possibleNumberPattern>\d{9}</possibleNumberPattern> 543 <exampleNumber>602345678</exampleNumber> 544 </premiumRate> 545 <personalNumber> 546 <nationalNumberPattern>50\d{8}</nationalNumberPattern> 547 <possibleNumberPattern>\d{10}</possibleNumberPattern> 548 <exampleNumber>5012345678</exampleNumber> 549 </personalNumber> 550 <voip> 551 <nationalNumberPattern>70\d{8}</nationalNumberPattern> 552 <possibleNumberPattern>\d{10}</possibleNumberPattern> 553 <exampleNumber>7012345678</exampleNumber> 554 </voip> 555 </territory> 556 557 <!-- Mexico --> 558 <territory id="MX" countryCode="52" internationalPrefix="00" 559 nationalPrefix="01" nationalPrefixForParsing="01|04[45](\d{10})" 560 nationalPrefixTransformRule="1$1" nationalPrefixFormattingRule="$NP $FG" 561 nationalPrefixOptionalWhenFormatting="true"> 562 <availableFormats> 563 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 564 <leadingDigits>[89]00</leadingDigits> 565 <format>$1 $2 $3</format> 566 </numberFormat> 567 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 568 <leadingDigits>33|55|81</leadingDigits> 569 <format>$1 $2 $3</format> 570 </numberFormat> 571 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 572 <leadingDigits>[2467]|3[0-24-9]|5[0-46-9]|8[2-9]|9[1-9]</leadingDigits> 573 <format>$1 $2 $3</format> 574 </numberFormat> 575 <numberFormat nationalPrefixFormattingRule="$FG" pattern="(1)(\d{2})(\d{4})(\d{4})"> 576 <leadingDigits>1(?:33|55|81)</leadingDigits> 577 <format>045 $2 $3 $4</format> 578 <intlFormat>$1 $2 $3 $4</intlFormat> 579 </numberFormat> 580 <numberFormat nationalPrefixFormattingRule="$FG" pattern="(1)(\d{3})(\d{3})(\d{4})"> 581 <leadingDigits>1(?:[124579]|3[0-24-9]|5[0-46-9]|8[02-9])</leadingDigits> 582 <format>045 $2 $3 $4</format> 583 <intlFormat>$1 $2 $3 $4</intlFormat> 584 </numberFormat> 585 </availableFormats> 586 <generalDesc> 587 <nationalNumberPattern>[1-9]\d{9,10}</nationalNumberPattern> 588 <possibleNumberPattern>\d{7,11}</possibleNumberPattern> 589 </generalDesc> 590 <fixedLine> 591 <nationalNumberPattern>[2-9]\d{9}</nationalNumberPattern> 592 <possibleNumberPattern>\d{7,10}</possibleNumberPattern> 593 </fixedLine> 594 <mobile> 595 <nationalNumberPattern>1\d{10}</nationalNumberPattern> 596 <possibleNumberPattern>\d{11}</possibleNumberPattern> 597 </mobile> 598 <tollFree> 599 <nationalNumberPattern>800\d{7}</nationalNumberPattern> 600 <possibleNumberPattern>\d{10}</possibleNumberPattern> 601 </tollFree> 602 <premiumRate> 603 <nationalNumberPattern>900\d{7}</nationalNumberPattern> 604 <possibleNumberPattern>\d{10}</possibleNumberPattern> 605 </premiumRate> 606 </territory> 607 608 <!-- New Zealand --> 609 <territory id="NZ" countryCode="64" internationalPrefix="00" 610 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 611 <availableFormats> 612 <numberFormat pattern="(\d)(\d{3})(\d{4})"> 613 <leadingDigits>24|[34679]</leadingDigits> 614 <format>$1-$2 $3</format> 615 </numberFormat> 616 <numberFormat pattern="(\d)(\d{3})(\d{3,5})"> 617 <leadingDigits>2[179]</leadingDigits> 618 <format>$1-$2 $3</format> 619 </numberFormat> 620 <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})"> 621 <leadingDigits>[89]</leadingDigits> 622 <format>$1 $2 $3</format> 623 </numberFormat> 624 </availableFormats> 625 <generalDesc> 626 <nationalNumberPattern> 627 [289]\d{7,9}| 628 [3-7]\d{7} 629 </nationalNumberPattern> 630 <possibleNumberPattern>\d{7,10}</possibleNumberPattern> 631 </generalDesc> 632 <fixedLine> 633 <nationalNumberPattern>24099\d{3}|(?:3[2-79]|[479][2-689]|6[235-9])\d{6}</nationalNumberPattern> 634 <possibleNumberPattern>\d{7,8}</possibleNumberPattern> 635 </fixedLine> 636 <mobile> 637 <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> 638 <possibleNumberPattern>\d{8,10}</possibleNumberPattern> 639 </mobile> 640 <tollFree> 641 <nationalNumberPattern>800\d{6,7}</nationalNumberPattern> 642 <possibleNumberPattern>\d{9,10}</possibleNumberPattern> 643 </tollFree> 644 <premiumRate> 645 <nationalNumberPattern>900\d{6,7}</nationalNumberPattern> 646 <possibleNumberPattern>\d{9,10}</possibleNumberPattern> 647 </premiumRate> 648 </territory> 649 650 <!-- Poland --> 651 <!-- http://en.wikipedia.org/wiki/%2B48 --> 652 <territory id="PL" countryCode="48" internationalPrefix="00" 653 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 654 <availableFormats> 655 <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})"> 656 <format>$1 $2 $3 $4</format> 657 </numberFormat> 658 </availableFormats> 659 <generalDesc> 660 <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern> 661 <possibleNumberPattern>\d{9}</possibleNumberPattern> 662 </generalDesc> 663 <mobile> 664 <nationalNumberPattern>(?:5[01]|6[069]|7[289]|88)\d{7}</nationalNumberPattern> 665 </mobile> 666 <tollFree> 667 <nationalNumberPattern>800\d{6}</nationalNumberPattern> 668 </tollFree> 669 <premiumRate> 670 <nationalNumberPattern>70\d{7}</nationalNumberPattern> 671 </premiumRate> 672 </territory> 673 674 <!-- Runion (French Departments and Territories in the Indian Ocean) --> 675 <!-- Note this shares the same country code as La Mayotte and French 676 Southern Territories, and the formatting patterns here are used by all of 677 them. This is present to test leadingDigits. --> 678 <territory id="RE" countryCode="262" leadingDigits="262|6(?:9[23]|47)|8" 679 internationalPrefix="00" nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 680 <availableFormats> 681 <numberFormat pattern="([268]\d{2})(\d{2})(\d{2})(\d{2})"> 682 <format>$1 $2 $3 $4</format> 683 </numberFormat> 684 </availableFormats> 685 <generalDesc> 686 <nationalNumberPattern>[268]\d{8}</nationalNumberPattern> 687 <possibleNumberPattern>\d{9}</possibleNumberPattern> 688 </generalDesc> 689 <fixedLine> 690 <!-- 0876 numbers are mentioned in the plan, but none in use can be 691 found. --> 692 <nationalNumberPattern>262\d{6}</nationalNumberPattern> 693 <exampleNumber>262161234</exampleNumber> 694 </fixedLine> 695 <mobile> 696 <nationalNumberPattern>6(?:9[23]|47)\d{6}</nationalNumberPattern> 697 <possibleNumberPattern>\d{9}</possibleNumberPattern> 698 <exampleNumber>692123456</exampleNumber> 699 </mobile> 700 <!-- 08* Numbers in Runion are the same as those valid in France. --> 701 <tollFree> 702 <nationalNumberPattern>80\d{7}</nationalNumberPattern> 703 <exampleNumber>801234567</exampleNumber> 704 </tollFree> 705 <premiumRate> 706 <nationalNumberPattern>8(?:1[01]|2[0156]|84|9[0-37-9])\d{6}</nationalNumberPattern> 707 <exampleNumber>810123456</exampleNumber> 708 </premiumRate> 709 </territory> 710 711 <!-- Singapore --> 712 <!-- http://www.ida.gov.sg/policies%20and%20regulation/20060508120124.aspx --> 713 <!-- For testing the AYTF with long NDDs, "777777" is added as a possible national prefix. --> 714 <territory id="SG" countryCode="65" internationalPrefix="0[0-3][0-9]" 715 nationalPrefixForParsing="777777"> 716 <availableFormats> 717 <numberFormat pattern="(\d{4})(\d{4})"> 718 <leadingDigits>[369]|8[1-9]</leadingDigits> 719 <format>$1 $2</format> 720 </numberFormat> 721 <numberFormat pattern="(\d{4})(\d{3})(\d{4})"> 722 <leadingDigits>1[89]</leadingDigits> 723 <format>$1 $2 $3</format> 724 </numberFormat> 725 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 726 <leadingDigits>800</leadingDigits> 727 <format>$1 $2 $3</format> 728 </numberFormat> 729 </availableFormats> 730 <generalDesc> 731 <nationalNumberPattern>[13689]\d{7,10}</nationalNumberPattern> 732 <!-- This specific pattern with the | is used to unit-test IsPossibleNumberWithReason. --> 733 <possibleNumberPattern> 734 \d{8}| 735 \d{10,11} 736 </possibleNumberPattern> 737 </generalDesc> 738 <fixedLine> 739 <nationalNumberPattern>[36]\d{7}</nationalNumberPattern> 740 <possibleNumberPattern>\d{8}</possibleNumberPattern> 741 </fixedLine> 742 <mobile> 743 <nationalNumberPattern>[89]\d{7}</nationalNumberPattern> 744 <possibleNumberPattern>\d{8}</possibleNumberPattern> 745 </mobile> 746 <tollFree> 747 <nationalNumberPattern>1?800\d{7}</nationalNumberPattern> 748 <possibleNumberPattern>\d{10,11}</possibleNumberPattern> 749 </tollFree> 750 <premiumRate> 751 <nationalNumberPattern>1900\d{7}</nationalNumberPattern> 752 <possibleNumberPattern>\d{11}</possibleNumberPattern> 753 </premiumRate> 754 </territory> 755 756 <!-- United States --> 757 <!-- http://www.nanpa.com/reports/reports_npa.html --> 758 <!-- For testing purposes, numbers starting with 24 are not considered US numbers.--> 759 <territory id="US" countryCode="1" internationalPrefix="011" 760 preferredExtnPrefix=" extn. " nationalPrefix="1" 761 mainCountryForCode="true" nationalPrefixOptionalWhenFormatting="true" 762 mobileNumberPortableRegion="true"> 763 <availableFormats> 764 <numberFormat pattern="(\d{3})(\d{4})"> 765 <format>$1 $2</format> 766 <intlFormat>NA</intlFormat> 767 </numberFormat> 768 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 769 <format>$1 $2 $3</format> 770 </numberFormat> 771 </availableFormats> 772 <generalDesc> 773 <!-- Numbers beginning with 7 are excluded for testing purposes only. --> 774 <nationalNumberPattern>[13-689]\d{9}|2[0-35-9]\d{8}</nationalNumberPattern> 775 <possibleNumberPattern>\d{7}(?:\d{3})?</possibleNumberPattern> 776 <exampleNumber>1234567890</exampleNumber> 777 </generalDesc> 778 <noInternationalDialling> 779 <!-- This range is added for testing purposes only. --> 780 <nationalNumberPattern>800\d{7}</nationalNumberPattern> 781 <possibleNumberPattern>\d{10}</possibleNumberPattern> 782 </noInternationalDialling> 783 <tollFree> 784 <nationalNumberPattern>8(?:00|66|77|88)\d{7}</nationalNumberPattern> 785 <possibleNumberPattern>\d{10}</possibleNumberPattern> 786 </tollFree> 787 <premiumRate> 788 <nationalNumberPattern>900\d{7}</nationalNumberPattern> 789 <possibleNumberPattern>\d{10}</possibleNumberPattern> 790 </premiumRate> 791 </territory> 792 793 <!-- Mayotte --> 794 <territory id="YT" countryCode="262" leadingDigits="269|639" 795 internationalPrefix="00" nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 796 <!-- Formatting as per La Runion. --> 797 <generalDesc> 798 <nationalNumberPattern>[268]\d{8}</nationalNumberPattern> 799 <possibleNumberPattern>\d{9}</possibleNumberPattern> 800 </generalDesc> 801 <fixedLine> 802 <nationalNumberPattern>2696[0-4]\d{4}</nationalNumberPattern> 803 <exampleNumber>269601234</exampleNumber> 804 </fixedLine> 805 <mobile> 806 <nationalNumberPattern>639\d{6}</nationalNumberPattern> 807 <exampleNumber>639123456</exampleNumber> 808 </mobile> 809 <!-- Same as in France. --> 810 <tollFree> 811 <nationalNumberPattern>80\d{7}</nationalNumberPattern> 812 <exampleNumber>801234567</exampleNumber> 813 </tollFree> 814 </territory> 815 816 <!-- International Toll Free numbers --> 817 <territory id="001" countryCode="800" leadingZeroPossible="true"> 818 <availableFormats> 819 <numberFormat pattern="(\d{4})(\d{4})"> 820 <format>$1 $2</format> 821 </numberFormat> 822 </availableFormats> 823 <generalDesc> 824 <nationalNumberPattern>\d{8}</nationalNumberPattern> 825 <possibleNumberPattern>\d{8}</possibleNumberPattern> 826 <exampleNumber>12345678</exampleNumber> 827 </generalDesc> 828 <fixedLine> 829 <nationalNumberPattern>NA</nationalNumberPattern> 830 <possibleNumberPattern>NA</possibleNumberPattern> 831 </fixedLine> 832 <mobile> 833 <nationalNumberPattern>NA</nationalNumberPattern> 834 <possibleNumberPattern>NA</possibleNumberPattern> 835 </mobile> 836 <tollFree> 837 <nationalNumberPattern>\d{8}</nationalNumberPattern> 838 </tollFree> 839 </territory> 840 841 <!-- Universal International Premium Rate Number --> 842 <territory id="001" countryCode="979"> 843 <availableFormats> 844 <numberFormat pattern="(\d)(\d{4})(\d{4})"> 845 <format>$1 $2 $3</format> 846 </numberFormat> 847 </availableFormats> 848 <generalDesc> 849 <nationalNumberPattern>\d{9}</nationalNumberPattern> 850 <possibleNumberPattern>\d{9}</possibleNumberPattern> 851 <exampleNumber>123456789</exampleNumber> 852 </generalDesc> 853 <fixedLine> 854 <nationalNumberPattern>NA</nationalNumberPattern> 855 <possibleNumberPattern>NA</possibleNumberPattern> 856 </fixedLine> 857 <mobile> 858 <nationalNumberPattern>NA</nationalNumberPattern> 859 <possibleNumberPattern>NA</possibleNumberPattern> 860 </mobile> 861 <premiumRate> 862 <nationalNumberPattern>\d{9}</nationalNumberPattern> 863 </premiumRate> 864 </territory> 865 </territories> 866 </phoneNumberMetadata> 867