Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: third_party/libphonenumber/resources/PhoneNumberMetaDataForTesting.xml

Issue 6803005: Autofill phone number enhancements and integration of Phone Number Util Library: part 1 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 <!-- Copyright (C) 2009 Google Inc.
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
20 ../src/PhoneNumberMetaData.xml
21 -->
22
23 <phoneNumberMetadata>
24 <territories>
25 <!-- Andorra -->
26 <territory id="AD" countryCode="376" internationalPrefix="00">
27 </territory>
28
29 <!-- Angola -->
30 <!-- This country has been coopted to test the case of a national prefix
31 with a non-numeric symbol in it. -->
32 <territory id="AO" countryCode="244" internationalPrefix="00" nationalPrefix ="0~0">
33 <availableFormats>
34 <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
35 <format>$1 $2 $3</format>
36 </numberFormat>
37 </availableFormats>
38 <generalDesc>
39 <nationalNumberPattern>[29]\d{8}</nationalNumberPattern>
40 <possibleNumberPattern>\d{9}</possibleNumberPattern>
41 </generalDesc>
42 <fixedLine>
43 <nationalNumberPattern>2\d(?:[26-9]\d|\d[26-9])\d{5}</nationalNumberPatt ern>
44 <exampleNumber>222123456</exampleNumber>
45 </fixedLine>
46 <mobile>
47 <!-- Expanded the 92 prefix possibilities to matchnumbers found online. -->
48 <nationalNumberPattern>9[1-3]\d{7}</nationalNumberPattern>
49 <exampleNumber>923123456</exampleNumber>
50 </mobile>
51 </territory>
52
53 <!-- Argentina -->
54 <territory id="AR" countryCode="54" internationalPrefix="00"
55 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"
56 nationalPrefixForParsing="0(?:(11|343|3715)15)?"
57 nationalPrefixTransformRule="9$1">
58 <!-- Note in nationalPrefixForParsing, the areacode (such as 11, 343, etc. ), when present in
59 front of carrier selection code 15, is captured to replace $1 in
60 nationalPrefixTransformRule -->
61 <availableFormats>
62 <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
63 <leadingDigits>11</leadingDigits>
64 <format>$1 $2-$3</format>
65 </numberFormat>
66 <numberFormat pattern="(\d{4})(\d{2})(\d{4})">
67 <leadingDigits>1[02-9]|[23]</leadingDigits>
68 <format>$1 $2-$3</format>
69 </numberFormat>
70 <numberFormat pattern="9(11)(\d{4})(\d{4})">
71 <leadingDigits>911</leadingDigits>
72 <format>$1 15 $2-$3</format>
73 </numberFormat>
74 <numberFormat pattern="9(\d{4})(\d{2})(\d{4})"
75 carrierCodeFormattingRule="$NP$FG $CC">
76 <leadingDigits>9(?:1[02-9]|[23])</leadingDigits>
77 <format>$1 $2-$3</format>
78 </numberFormat>
79 <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
80 <leadingDigits>[68]</leadingDigits>
81 <format>$1-$2-$3</format>
82 </numberFormat>
83 <intlNumberFormat pattern="(\d{2})(\d{4})(\d{4})">
84 <leadingDigits>11</leadingDigits>
85 <format>$1 $2-$3</format>
86 </intlNumberFormat>
87 <intlNumberFormat pattern="(\d{4})(\d{2})(\d{4})">
88 <leadingDigits>1[02-9]|[23]</leadingDigits>
89 <format>$1 $2-$3</format>
90 </intlNumberFormat>
91 <intlNumberFormat pattern="(9)(11)(\d{4})(\d{4})">
92 <leadingDigits>911</leadingDigits>
93 <format>$1 $2 $3 $4</format>
94 </intlNumberFormat>
95 <intlNumberFormat pattern="(9)(\d{4})(\d{2})(\d{4})">
96 <leadingDigits>9(?:1[02-9]|[23])</leadingDigits>
97 <format>$1 $2 $3 $4</format>
98 </intlNumberFormat>
99 <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
100 <leadingDigits>[68]</leadingDigits>
101 <format>$1-$2-$3</format>
102 </intlNumberFormat>
103 </availableFormats>
104 <generalDesc>
105 <nationalNumberPattern>[1-3689]\d{9,10}</nationalNumberPattern>
106 <possibleNumberPattern>\d{6,11}</possibleNumberPattern>
107 </generalDesc>
108 <fixedLine>
109 <nationalNumberPattern>[1-3]\d{9}</nationalNumberPattern>
110 <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
111 </fixedLine>
112 <mobile>
113 <nationalNumberPattern>9\d{10}|[1-3]\d{9}</nationalNumberPattern>
114 <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
115 </mobile>
116 <tollFree>
117 <nationalNumberPattern>80\d{8}</nationalNumberPattern>
118 <possibleNumberPattern>\d{10}</possibleNumberPattern>
119 </tollFree>
120 <premiumRate>
121 <nationalNumberPattern>6(0\d|10)\d{7}</nationalNumberPattern>
122 <possibleNumberPattern>\d{10}</possibleNumberPattern>
123 </premiumRate>
124 </territory>
125
126 <!-- Australia -->
127 <territory id="AU" countryCode="61" internationalPrefix="001[12]"
128 nationalPrefix="0" preferredInternationalPrefix="0011"
129 nationalPrefixFormattingRule="$NP$FG">
130 <availableFormats>
131 <numberFormat nationalPrefixFormattingRule="$FG"
132 pattern="(\d{4})(\d{3})(\d{3})" >
133 <leadingDigits>1</leadingDigits>
134 <format>$1 $2 $3</format>
135 </numberFormat>
136 <numberFormat pattern="(\d{1})(\d{4})(\d{4})">
137 <leadingDigits>[2-478]</leadingDigits>
138 <format>$1 $2 $3</format>
139 </numberFormat>
140 </availableFormats>
141 <generalDesc >
142 <nationalNumberPattern>[1-578]\d{4,14}</nationalNumberPattern>
143 <possibleNumberPattern>\d{5,15}</possibleNumberPattern>
144 </generalDesc>
145 <fixedLine>
146 <nationalNumberPattern>[2378]\d{8}</nationalNumberPattern>
147 <possibleNumberPattern>\d{9}</possibleNumberPattern>
148 </fixedLine>
149 <mobile>
150 <nationalNumberPattern>4\d{8}</nationalNumberPattern>
151 <possibleNumberPattern>\d{9}</possibleNumberPattern>
152 </mobile>
153 <tollFree>
154 <nationalNumberPattern>1800\d{6}</nationalNumberPattern>
155 <possibleNumberPattern>\d{10}</possibleNumberPattern>
156 </tollFree>
157 <premiumRate>
158 <nationalNumberPattern>190[0126]\d{6}</nationalNumberPattern>
159 <possibleNumberPattern>\d{10}</possibleNumberPattern>
160 </premiumRate>
161 </territory>
162
163 <!-- Bahamas -->
164 <territory id="BS" countryCode="1" internationalPrefix="011"
165 nationalPrefix="1">
166 <generalDesc>
167 <nationalNumberPattern>(242|8(00|66|77|88)|900)\d{7}</nationalNumberPatt ern>
168 <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
169 </generalDesc>
170 <fixedLine>
171 <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>
172 </fixedLine>
173 <mobile>
174 <nationalNumberPattern>242(357|359|457|557)\d{4}</nationalNumberPattern>
175 <possibleNumberPattern>\d{10}</possibleNumberPattern>
176 </mobile>
177 <tollFree>
178 <nationalNumberPattern>8(00|66|77|88)\d{7}</nationalNumberPattern>
179 <possibleNumberPattern>\d{10}</possibleNumberPattern>
180 </tollFree>
181 <premiumRate>
182 <nationalNumberPattern>900\d{7}</nationalNumberPattern>
183 <possibleNumberPattern>\d{10}</possibleNumberPattern>
184 </premiumRate>
185 </territory>
186
187 <!-- Germany -->
188 <territory id="DE" countryCode="49" internationalPrefix="00"
189 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
190 <availableFormats>
191 <numberFormat pattern="(\d{3})(\d{3,8})">
192 <leadingDigits>2|3[3-9]|906|[4-9][1-9]1</leadingDigits>
193 <format>$1 $2</format>
194 </numberFormat>
195 <numberFormat pattern="(\d{2})(\d{4,9})">
196 <leadingDigits>[34]0|[68]9</leadingDigits>
197 <format>$1/$2</format>
198 </numberFormat>
199 <!-- Extra fictional pattern for shorter numbers with the same prefixes as the following
200 pattern, to illustrate the problem the AYTF has with real patterns that share this
201 property. -->
202 <numberFormat pattern="([4-9]\d)(\d{2})">
203 <leadingDigits>[4-9]</leadingDigits>
204 <leadingDigits>[4-6]|[7-9](?:\d[1-9]|[1-9]\d)</leadingDigits>
205 <format>$1 $2</format>
206 </numberFormat>
207 <numberFormat pattern="([4-9]\d{3})(\d{2,7})">
208 <leadingDigits>[4-9]</leadingDigits>
209 <leadingDigits>[4-6]|[7-9](?:\d[1-9]|[1-9]\d)</leadingDigits>
210 <format>$1 $2</format>
211 </numberFormat>
212 <numberFormat pattern="(\d{3})(\d{1})(\d{6})">
213 <leadingDigits>800</leadingDigits>
214 <format>$1 $2 $3</format>
215 </numberFormat>
216 <numberFormat pattern="(\d{3})(\d{3,4})(\d{4})">
217 <leadingDigits>900</leadingDigits>
218 <format>$1 $2 $3</format>
219 </numberFormat>
220 </availableFormats>
221 <generalDesc>
222 <nationalNumberPattern>\d{4,14}</nationalNumberPattern>
223 <possibleNumberPattern>\d{2,14}</possibleNumberPattern>
224 </generalDesc>
225 <fixedLine>
226 <nationalNumberPattern>(?:[24-6]\d{2}|3[03-9]\d|[789](?:[1-9]\d|0[2-9])) \d{3,8}</nationalNumberPattern>
227 <exampleNumber>30123456</exampleNumber>
228 </fixedLine>
229 <mobile>
230 <nationalNumberPattern>1(5\d{9}|7\d{8}|6[02]\d{8}|63\d{7})</nationalNumb erPattern>
231 <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
232 </mobile>
233 <tollFree>
234 <nationalNumberPattern>800\d{7}</nationalNumberPattern>
235 <possibleNumberPattern>\d{10}</possibleNumberPattern>
236 </tollFree>
237 <premiumRate>
238 <nationalNumberPattern>900([135]\d{6}|9\d{7})</nationalNumberPattern>
239 <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
240 </premiumRate>
241 </territory>
242
243 <!-- United Kingdom -->
244 <territory id="GB" countryCode="44" internationalPrefix="00"
245 nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)">
246 <availableFormats>
247 <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
248 <leadingDigits>[1-59]|[78]0</leadingDigits>
249 <format>$1 $2 $3</format>
250 </numberFormat>
251 <numberFormat pattern="(\d)(\d{3})(\d{3})(\d{3})">
252 <leadingDigits>6</leadingDigits>
253 <format>$1 $2 $3 $4</format>
254 </numberFormat>
255 <numberFormat pattern="(\d{4})(\d{3})(\d{3})">
256 <leadingDigits>7[1-57-9]</leadingDigits>
257 <format>$1 $2 $3</format>
258 </numberFormat>
259 <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
260 <leadingDigits>8[47]</leadingDigits>
261 <format>$1 $2 $3</format>
262 </numberFormat>
263 </availableFormats>
264 <generalDesc>
265 <nationalNumberPattern>\d{10}</nationalNumberPattern>
266 <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
267 </generalDesc>
268 <fixedLine>
269 <nationalNumberPattern>[1-6]\d{9}</nationalNumberPattern>
270 </fixedLine>
271 <mobile>
272 <nationalNumberPattern>7[1-57-9]\d{8}</nationalNumberPattern>
273 <possibleNumberPattern>\d{10}</possibleNumberPattern>
274 </mobile>
275 <tollFree>
276 <nationalNumberPattern>80\d{8}</nationalNumberPattern>
277 <possibleNumberPattern>\d{10}</possibleNumberPattern>
278 </tollFree>
279 <premiumRate>
280 <nationalNumberPattern>9[018]\d{8}</nationalNumberPattern>
281 <possibleNumberPattern>\d{10}</possibleNumberPattern>
282 </premiumRate>
283 <sharedCost>
284 <nationalNumberPattern>8(?:4[3-5]|7[0-2])\d{7}</nationalNumberPattern>
285 <possibleNumberPattern>\d{10}</possibleNumberPattern>
286 </sharedCost>
287 <voip>
288 <nationalNumberPattern>56\d{8}</nationalNumberPattern>
289 <possibleNumberPattern>\d{10}</possibleNumberPattern>
290 </voip>
291 <personalNumber>
292 <nationalNumberPattern>70\d{8}</nationalNumberPattern>
293 <possibleNumberPattern>\d{10}</possibleNumberPattern>
294 </personalNumber>
295 </territory>
296
297 <!-- Italy -->
298 <!-- http://en.wikipedia.org/wiki/%2B39 -->
299 <territory id="IT" countryCode="39" internationalPrefix="00" leadingZeroPoss ible="true">
300 <availableFormats>
301 <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
302 <leadingDigits>0[26]</leadingDigits>
303 <format>$1 $2 $3</format>
304 </numberFormat>
305 <numberFormat pattern="(\d{3})(\d{4})(\d{3,4})">
306 <leadingDigits>0[13-57-9]</leadingDigits>
307 <format>$1 $2 $3</format>
308 </numberFormat>
309 <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})">
310 <leadingDigits>3</leadingDigits>
311 <format>$1 $2 $3</format>
312 </numberFormat>
313 <numberFormat pattern="(\d{3})(\d{3,6})">
314 <leadingDigits>8</leadingDigits>
315 <format>$1 $2</format>
316 </numberFormat>
317 </availableFormats>
318 <generalDesc>
319 <nationalNumberPattern>[0389]\d{5,10}</nationalNumberPattern>
320 <possibleNumberPattern>\d{6,11}</possibleNumberPattern>
321 </generalDesc>
322 <fixedLine>
323 <nationalNumberPattern>0\d{9,10}</nationalNumberPattern>
324 <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
325 </fixedLine>
326 <mobile>
327 <nationalNumberPattern>3\d{8,9}</nationalNumberPattern>
328 <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
329 </mobile>
330 <tollFree>
331 <nationalNumberPattern>80(?:0\d{6}|3\d{3})</nationalNumberPattern>
332 <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
333 </tollFree>
334 <premiumRate>
335 <nationalNumberPattern>89(?:2\d{3}|9\d{6})</nationalNumberPattern>
336 <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
337 </premiumRate>
338 </territory>
339
340 <!-- Japan -->
341 <!-- The metadata here is added to unit test AsYouTypeFormatter for JP, whic h requires switching
342 patterns as digits beyond the third one are entered. As a result, only a few fake
343 formatting rules are added. -->
344 <territory id="JP" countryCode="81" internationalPrefix="010"
345 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
346 <availableFormats>
347 <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
348 <leadingDigits>[57-9]0</leadingDigits>
349 <format>$1 $2 $3</format>
350 </numberFormat>
351 <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
352 <leadingDigits>222|333</leadingDigits>
353 <leadingDigits>(?:222|333)1</leadingDigits>
354 <leadingDigits>(?:222|333)11</leadingDigits>
355 <format>$1 $2 $3</format>
356 </numberFormat>
357 <numberFormat pattern="(\d{4})(\d)(\d{4})">
358 <leadingDigits>222|333</leadingDigits>
359 <leadingDigits>2221|3332</leadingDigits>
360 <leadingDigits>22212|3332</leadingDigits>
361 <leadingDigits>222120|3332</leadingDigits>
362 <format>$1 $2 $3</format>
363 </numberFormat>
364 <numberFormat pattern="(\d{3})(\d{2})(\d{4})">
365 <leadingDigits>[23]</leadingDigits>
366 <format>$1 $2 $3</format>
367 </numberFormat>
368 <!-- The following numberFormat is added to test that the format contain ing the star sign is
369 not used by the AYTF. -->
370 <numberFormat pattern="(\d{4})">
371 <leadingDigits>[23]</leadingDigits>
372 <format>*$1</format>
373 </numberFormat>
374 </availableFormats>
375 </territory>
376
377 <!-- Korea (Rep. of) -->
378 <!-- http://www.itu.int/oth/T0202000072/en -->
379 <!-- http://en.wikipedia.org/wiki/%2B82 -->
380 <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boar dId=1074&boardSeq=2349 -->
381 <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boar dId=1074&boardSeq=2240 -->
382 <!-- http://www.telecentro.co.kr/sub/index.php?job=detail&ebcf_id=faq&page=1 &mid=0503&eb_seq=36 -->
383 <!-- Exceptions :
384 internationalPrefix
385 0031, 0033, 0071, 0073 - Special services of KT and DACOM, ignorable
386 nationalPrefix
387 1[4-6]XX-YYYY - Country-wide common number services, display as it i s without hyphens -->
388 <territory id="KR" countryCode="82" internationalPrefix="00(?:[124-68]|[37]\ d{2})"
389 nationalPrefix="0" nationalPrefixForParsing="0(8[1-46-8]|85\d{2}) ?"
390 nationalPrefixFormattingRule="$NP$FG">
391 <availableFormats>
392 <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
393 <leadingDigits>1(?:0|1[19]|[69]9|5[458])|[57]0</leadingDigits>
394 <leadingDigits>1(?:0|1[19]|[69]9|5(?:44|59|8))|[57]0</leadingDigits>
395 <format>$1-$2-$3</format>
396 </numberFormat>
397 <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
398 <leadingDigits>1(?:[169][2-8]|[78]|5[1-4])|[68]0|[3-9][1-9][2-9]</lead ingDigits>
399 <leadingDigits>1(?:[169][2-8]|[78]|5(?:[1-3]|4[56]))|[68]0|[3-9][1-9][ 2-9]</leadingDigits>
400 <format>$1-$2-$3</format>
401 </numberFormat>
402 <numberFormat pattern="(\d{3})(\d)(\d{4})">
403 <leadingDigits>131</leadingDigits>
404 <leadingDigits>1312</leadingDigits>
405 <format>$1-$2-$3</format>
406 </numberFormat>
407 <numberFormat pattern="(\d{3})(\d{2})(\d{4})">
408 <leadingDigits>131</leadingDigits>
409 <leadingDigits>131[13-9]</leadingDigits>
410 <format>$1-$2-$3</format>
411 </numberFormat>
412 <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
413 <leadingDigits>13[2-9]</leadingDigits>
414 <format>$1-$2-$3</format>
415 </numberFormat>
416 <numberFormat pattern="(\d{2})(\d{2})(\d{3})(\d{4})">
417 <leadingDigits>30</leadingDigits>
418 <format>$1-$2-$3-$4</format>
419 </numberFormat>
420 <numberFormat pattern="(\d)(\d{4})(\d{4})">
421 <leadingDigits>2(?:[26]|3[0-467])</leadingDigits>
422 <leadingDigits>2(?:[26]|3(?:01|1[45]|2[17-9]|39|4|6[67]|7[078]))</lead ingDigits>
423 <format>$1-$2-$3</format>
424 </numberFormat>
425 <numberFormat pattern="(\d)(\d{3})(\d{4})">
426 <leadingDigits>2(?:3[0-35-9]|[457-9])</leadingDigits>
427 <leadingDigits>2(?:3(?:0[02-9]|1[0-36-9]|2[02-6]|3[0-8]|6[0-589]|7[1-6 9]|[589])|[457-9])</leadingDigits>
428 <format>$1-$2-$3</format>
429 </numberFormat>
430 <numberFormat pattern="(\d)(\d{3})">
431 <leadingDigits>21[0-46-9]</leadingDigits>
432 <leadingDigits>21(?:[0-247-9]|3[124]|6[1269])</leadingDigits>
433 <format>$1-$2</format>
434 </numberFormat>
435 <numberFormat pattern="(\d)(\d{4})">
436 <leadingDigits>21[36]</leadingDigits>
437 <leadingDigits>21(?:3[035-9]|6[03-578])</leadingDigits>
438 <format>$1-$2</format>
439 </numberFormat>
440 <numberFormat pattern="(\d{2})(\d{3})">
441 <leadingDigits>[3-9][1-9]1</leadingDigits>
442 <leadingDigits>[3-9][1-9]1(?:[0-46-9])</leadingDigits>
443 <leadingDigits>[3-9][1-9]1(?:[0-247-9]|3[124]|6[1269])</leadingDigits>
444 <format>$1-$2</format>
445 </numberFormat>
446 <numberFormat pattern="(\d{2})(\d{4})">
447 <leadingDigits>[3-9][1-9]1</leadingDigits>
448 <leadingDigits>[3-9][1-9]1[36]</leadingDigits>
449 <leadingDigits>[3-9][1-9]1(?:3[035-9]|6[03-578])</leadingDigits>
450 <format>$1-$2</format>
451 </numberFormat>
452 </availableFormats>
453 <generalDesc>
454 <nationalNumberPattern>[1-79]\d{3,9}|8\d{8}</nationalNumberPattern>
455 <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
456 </generalDesc>
457 <fixedLine>
458 <nationalNumberPattern>(?:2|[34][1-3]|5[1-5]|6[1-4])(?:1\d{2,3}|[2-9]\d{ 6,7})</nationalNumberPattern>
459 <possibleNumberPattern>\d{4,10}</possibleNumberPattern>
460 <exampleNumber>22123456</exampleNumber>
461 </fixedLine>
462 <mobile>
463 <nationalNumberPattern>1[0-25-9]\d{7,8}</nationalNumberPattern>
464 <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
465 <exampleNumber>1023456789</exampleNumber>
466 </mobile>
467 <tollFree>
468 <nationalNumberPattern>80\d{7}</nationalNumberPattern>
469 <possibleNumberPattern>\d{9}</possibleNumberPattern>
470 <exampleNumber>801234567</exampleNumber>
471 </tollFree>
472 <premiumRate>
473 <nationalNumberPattern>60[2-9]\d{6}</nationalNumberPattern>
474 <possibleNumberPattern>\d{9}</possibleNumberPattern>
475 <exampleNumber>602345678</exampleNumber>
476 </premiumRate>
477 <personalNumber>
478 <nationalNumberPattern>50\d{8}</nationalNumberPattern>
479 <possibleNumberPattern>\d{10}</possibleNumberPattern>
480 <exampleNumber>5012345678</exampleNumber>
481 </personalNumber>
482 <voip>
483 <nationalNumberPattern>70\d{8}</nationalNumberPattern>
484 <possibleNumberPattern>\d{10}</possibleNumberPattern>
485 <exampleNumber>7012345678</exampleNumber>
486 </voip>
487 </territory>
488
489 <!-- Mexico -->
490 <territory id="MX" countryCode="52" internationalPrefix="00"
491 nationalPrefix="01" nationalPrefixForParsing="01|04[45](\d{10})"
492 nationalPrefixTransformRule="1$1">
493 <availableFormats>
494 <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
495 <leadingDigits>[89]00</leadingDigits>
496 <format>$1 $2 $3</format>
497 </numberFormat>
498 <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
499 <leadingDigits>33|55|81</leadingDigits>
500 <format>$1 $2 $3</format>
501 </numberFormat>
502 <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
503 <leadingDigits>[2467]|3[0-24-9]|5[0-46-9]|8[2-9]|9[1-9]</leadingDigits >
504 <format>$1 $2 $3</format>
505 </numberFormat>
506 <numberFormat pattern="1(\d{2})(\d{4})(\d{4})">
507 <leadingDigits>1(?:33|55|81)</leadingDigits>
508 <format>045 $1 $2 $3</format>
509 </numberFormat>
510 <numberFormat pattern="1(\d{3})(\d{3})(\d{4})">
511 <leadingDigits>1(?:[124579]|3[0-24-9]|5[0-46-9]|8[02-9])</leadingDigit s>
512 <format>045 $1 $2 $3</format>
513 </numberFormat>
514 <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
515 <leadingDigits>[89]00</leadingDigits>
516 <format>$1 $2 $3</format>
517 </intlNumberFormat>
518 <intlNumberFormat pattern="(\d{2})(\d{4})(\d{4})">
519 <leadingDigits>33|55|81</leadingDigits>
520 <format>$1 $2 $3</format>
521 </intlNumberFormat>
522 <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
523 <leadingDigits>[2467]|3[0-24-9]|5[0-46-9]|8[2-9]|9[1-9]</leadingDigits >
524 <format>$1 $2 $3</format>
525 </intlNumberFormat>
526 <intlNumberFormat pattern="(1)(\d{2})(\d{4})(\d{4})">
527 <leadingDigits>1(?:33|55|81)</leadingDigits>
528 <format>$1 $2 $3 $4</format>
529 </intlNumberFormat>
530 <intlNumberFormat pattern="(1)(\d{3})(\d{3})(\d{4})">
531 <leadingDigits>1(?:[124579]|3[0-24-9]|5[0-46-9]|8[02-9])</leadingDigit s>
532 <format>$1 $2 $3 $4</format>
533 </intlNumberFormat>
534 </availableFormats>
535 <generalDesc>
536 <nationalNumberPattern>[1-9]\d{9,10}</nationalNumberPattern>
537 <possibleNumberPattern>\d{7,11}</possibleNumberPattern>
538 </generalDesc>
539 <fixedLine>
540 <nationalNumberPattern>[2-9]\d{9}</nationalNumberPattern>
541 <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
542 </fixedLine>
543 <mobile>
544 <nationalNumberPattern>1\d{10}</nationalNumberPattern>
545 <possibleNumberPattern>\d{11}</possibleNumberPattern>
546 </mobile>
547 <tollFree>
548 <nationalNumberPattern>800\d{7}</nationalNumberPattern>
549 <possibleNumberPattern>\d{10}</possibleNumberPattern>
550 </tollFree>
551 <premiumRate>
552 <nationalNumberPattern>900\d{7}</nationalNumberPattern>
553 <possibleNumberPattern>\d{10}</possibleNumberPattern>
554 </premiumRate>
555 </territory>
556
557 <!-- New Zealand -->
558 <territory id="NZ" countryCode="64" internationalPrefix="00"
559 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
560 <availableFormats>
561 <numberFormat pattern="(\d)(\d{3})(\d{4})">
562 <leadingDigits>24|[34679]</leadingDigits>
563 <format>$1-$2 $3</format>
564 </numberFormat>
565 <numberFormat pattern="(\d)(\d{3})(\d{3,5})">
566 <leadingDigits>2[179]</leadingDigits>
567 <format>$1-$2 $3</format>
568 </numberFormat>
569 <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})">
570 <leadingDigits>[89]</leadingDigits>
571 <format>$1 $2 $3</format>
572 </numberFormat>
573 </availableFormats>
574 <generalDesc>
575 <nationalNumberPattern>
576 [289]\d{7,9}|
577 [3-7]\d{7}
578 </nationalNumberPattern>
579 <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
580 </generalDesc>
581 <fixedLine>
582 <nationalNumberPattern>24099\d{3}|(?:3[2-79]|[479][2-689]|6[235-9])\d{6} </nationalNumberPattern>
583 <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
584 </fixedLine>
585 <mobile>
586 <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>
587 <possibleNumberPattern>\d{8,10}</possibleNumberPattern>
588 </mobile>
589 <tollFree>
590 <nationalNumberPattern>800\d{6,7}</nationalNumberPattern>
591 <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
592 </tollFree>
593 <premiumRate>
594 <nationalNumberPattern>900\d{6,7}</nationalNumberPattern>
595 <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
596 </premiumRate>
597 </territory>
598
599 <!-- Poland -->
600 <!-- http://en.wikipedia.org/wiki/%2B48 -->
601 <territory id="PL" countryCode="48" internationalPrefix="0~0"
602 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
603 <availableFormats>
604 <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})">
605 <format>$1 $2 $3 $4</format>
606 </numberFormat>
607 </availableFormats>
608 <generalDesc>
609 <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern>
610 <possibleNumberPattern>\d{9}</possibleNumberPattern>
611 </generalDesc>
612 <mobile>
613 <nationalNumberPattern>(?:5[01]|6[069]|7[289]|88)\d{7}</nationalNumberPa ttern>
614 </mobile>
615 <tollFree>
616 <nationalNumberPattern>800\d{6}</nationalNumberPattern>
617 </tollFree>
618 <premiumRate>
619 <nationalNumberPattern>70\d{7}</nationalNumberPattern>
620 </premiumRate>
621 </territory>
622
623 <!-- Réunion (French Departments and Territories in the Indian Ocean) -->
624 <!-- Note this shares the same country code as La Mayotte and French
625 Southern Territories, and the formatting patterns here are used by all of
626 them. This is present to test leadingDigits. -->
627 <territory id="RE" countryCode="262" leadingDigits="262|6(?:9[23]|47)|8"
628 internationalPrefix="00" nationalPrefix="0" nationalPrefixFormatt ingRule="$NP$FG">
629 <availableFormats>
630 <numberFormat pattern="([268]\d{2})(\d{2})(\d{2})(\d{2})">
631 <format>$1 $2 $3 $4</format>
632 </numberFormat>
633 </availableFormats>
634 <generalDesc>
635 <nationalNumberPattern>[268]\d{8}</nationalNumberPattern>
636 <possibleNumberPattern>\d{9}</possibleNumberPattern>
637 </generalDesc>
638 <fixedLine>
639 <!-- 0876 numbers are mentioned in the plan, but none in use can be
640 found. -->
641 <nationalNumberPattern>262\d{6}</nationalNumberPattern>
642 <exampleNumber>262161234</exampleNumber>
643 </fixedLine>
644 <mobile>
645 <nationalNumberPattern>6(?:9[23]|47)\d{6}</nationalNumberPattern>
646 <possibleNumberPattern>\d{9}</possibleNumberPattern>
647 <exampleNumber>692123456</exampleNumber>
648 </mobile>
649 <!-- 08* Numbers in Réunion are the same as those valid in France. -->
650 <tollFree>
651 <nationalNumberPattern>80\d{7}</nationalNumberPattern>
652 <exampleNumber>801234567</exampleNumber>
653 </tollFree>
654 <premiumRate>
655 <nationalNumberPattern>8(?:1[01]|2[0156]|84|9[0-37-9])\d{6}</nationalNum berPattern>
656 <exampleNumber>810123456</exampleNumber>
657 </premiumRate>
658 </territory>
659
660 <!-- Singapore -->
661 <!-- http://www.ida.gov.sg/policies%20and%20regulation/20060508120124.aspx - ->
662 <territory id="SG" countryCode="65" internationalPrefix="0[0-3][0-9]">
663 <availableFormats>
664 <numberFormat pattern="(\d{4})(\d{4})">
665 <leadingDigits>[369]|8[1-9]</leadingDigits>
666 <format>$1 $2</format>
667 </numberFormat>
668 <numberFormat pattern="(\d{4})(\d{3})(\d{4})">
669 <leadingDigits>1[89]</leadingDigits>
670 <format>$1 $2 $3</format>
671 </numberFormat>
672 <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
673 <leadingDigits>800</leadingDigits>
674 <format>$1 $2 $3</format>
675 </numberFormat>
676 </availableFormats>
677 <generalDesc>
678 <nationalNumberPattern>[13689]\d{7,10}</nationalNumberPattern>
679 <!-- This specific pattern with the | is used to unit-test IsPossibleNum berWithReason. -->
680 <possibleNumberPattern>
681 \d{8}|
682 \d{10,11}
683 </possibleNumberPattern>
684 </generalDesc>
685 <fixedLine>
686 <nationalNumberPattern>[36]\d{7}</nationalNumberPattern>
687 <possibleNumberPattern>\d{8}</possibleNumberPattern>
688 </fixedLine>
689 <mobile>
690 <nationalNumberPattern>[89]\d{7}</nationalNumberPattern>
691 <possibleNumberPattern>\d{8}</possibleNumberPattern>
692 </mobile>
693 <tollFree>
694 <nationalNumberPattern>1?800\d{7}</nationalNumberPattern>
695 <possibleNumberPattern>\d{10,11}</possibleNumberPattern>
696 </tollFree>
697 <premiumRate>
698 <nationalNumberPattern>1900\d{7}</nationalNumberPattern>
699 <possibleNumberPattern>\d{11}</possibleNumberPattern>
700 </premiumRate>
701 </territory>
702
703 <!-- United States -->
704 <!-- http://www.nanpa.com/reports/reports_npa.html -->
705 <!-- For testing purposes, numbers starting with 24 are not considered US
706 numbers.-->
707 <territory id="US" countryCode="1" internationalPrefix="011"
708 preferredExtnPrefix=" extn. " nationalPrefix="1"
709 mainCountryForCode="true" >
710 <availableFormats>
711 <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
712 <format>$1 $2 $3</format>
713 </numberFormat>
714 <numberFormat pattern="(\d{3})(\d{4})">
715 <format>$1 $2</format>
716 </numberFormat>
717 <intlNumberFormat pattern="(\d{3})(\d{3})(\d{4})">
718 <format>$1 $2 $3</format>
719 </intlNumberFormat>
720 </availableFormats>
721 <generalDesc>
722 <nationalNumberPattern>[13-9]\d{9}|2[0-35-9]\d{8}</nationalNumberPattern >
723 <possibleNumberPattern>\d{7}(?:\d{3})?</possibleNumberPattern>
724 <exampleNumber>1234567890</exampleNumber>
725 </generalDesc>
726 <noInternationalDialling>
727 <!-- This range is added for testing purposes only. -->
728 <nationalNumberPattern>800\d{7}</nationalNumberPattern>
729 <possibleNumberPattern>\d{10}</possibleNumberPattern>
730 </noInternationalDialling>
731 <tollFree>
732 <nationalNumberPattern>8(?:00|66|77|88)\d{7}</nationalNumberPattern>
733 <possibleNumberPattern>\d{10}</possibleNumberPattern>
734 </tollFree>
735 <premiumRate>
736 <nationalNumberPattern>900\d{7}</nationalNumberPattern>
737 <possibleNumberPattern>\d{10}</possibleNumberPattern>
738 </premiumRate>
739 </territory>
740
741 <!-- Mayotte -->
742 <territory id="YT" countryCode="262" leadingDigits="269|639"
743 internationalPrefix="00" nationalPrefix="0" nationalPrefixFormatt ingRule="$NP$FG">
744 <!-- Formatting as per La Réunion. -->
745 <generalDesc>
746 <nationalNumberPattern>[268]\d{8}</nationalNumberPattern>
747 <possibleNumberPattern>\d{9}</possibleNumberPattern>
748 </generalDesc>
749 <fixedLine>
750 <nationalNumberPattern>2696[0-4]\d{4}</nationalNumberPattern>
751 <exampleNumber>269601234</exampleNumber>
752 </fixedLine>
753 <mobile>
754 <nationalNumberPattern>639\d{6}</nationalNumberPattern>
755 <exampleNumber>639123456</exampleNumber>
756 </mobile>
757 <!-- Same as in France. -->
758 <tollFree>
759 <nationalNumberPattern>80\d{7}</nationalNumberPattern>
760 <exampleNumber>801234567</exampleNumber>
761 </tollFree>
762 </territory>
763 </territories>
764 </phoneNumberMetadata>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698