From 4f9b35c9c67647ebb09008cb2d5f46bd7bd9cba7 Mon Sep 17 00:00:00 2001 From: Joshua Gigg Date: Mon, 13 Nov 2023 09:43:15 +0000 Subject: [PATCH] Upstream metadata changes from Google for v8.13.25 - Updated phone metadata for region code(s): 883, BH, BJ, EH, GU, GY, HK, MA, NU, SG, US, VN --- METADATA-VERSION.txt | 2 +- src/data/PhoneNumberMetadata_883.php | 2 +- src/data/PhoneNumberMetadata_BH.php | 2 +- src/data/PhoneNumberMetadata_BJ.php | 2 +- src/data/PhoneNumberMetadata_EH.php | 2 +- src/data/PhoneNumberMetadata_GU.php | 6 +++--- src/data/PhoneNumberMetadata_GY.php | 12 +++++------- src/data/PhoneNumberMetadata_HK.php | 2 +- src/data/PhoneNumberMetadata_MA.php | 2 +- src/data/PhoneNumberMetadata_NU.php | 8 ++------ src/data/PhoneNumberMetadata_SG.php | 2 +- src/data/PhoneNumberMetadata_US.php | 4 ++-- src/data/PhoneNumberMetadata_VN.php | 2 +- 13 files changed, 21 insertions(+), 27 deletions(-) diff --git a/METADATA-VERSION.txt b/METADATA-VERSION.txt index f869b0e8..22a43f22 100644 --- a/METADATA-VERSION.txt +++ b/METADATA-VERSION.txt @@ -2,4 +2,4 @@ # It can be a commit, branch or tag of the https://github.com/google/libphonenumber project # # For more information, look at the phing tasks in build.xml -v8.13.24 +v8.13.25 diff --git a/src/data/PhoneNumberMetadata_883.php b/src/data/PhoneNumberMetadata_883.php index 2e8902f2..469a8558 100644 --- a/src/data/PhoneNumberMetadata_883.php +++ b/src/data/PhoneNumberMetadata_883.php @@ -63,7 +63,7 @@ ], 'voip' => [ - 'NationalNumberPattern' => '(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[013-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}', + 'NationalNumberPattern' => '(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}', 'ExampleNumber' => '510012345', ], 'pager' => diff --git a/src/data/PhoneNumberMetadata_BH.php b/src/data/PhoneNumberMetadata_BH.php index 38040ba3..e58f7c95 100644 --- a/src/data/PhoneNumberMetadata_BH.php +++ b/src/data/PhoneNumberMetadata_BH.php @@ -17,7 +17,7 @@ ], 'fixedLine' => [ - 'NationalNumberPattern' => '(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|7[7-9]|88)|9[69][69])|7(?:[07]\\d\\d|1(?:11|78)))\\d{4}', + 'NationalNumberPattern' => '(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|55|7[7-9]|88)|9[69][69])|7(?:[07]\\d\\d|1(?:11|78)))\\d{4}', 'ExampleNumber' => '17001234', ], 'mobile' => diff --git a/src/data/PhoneNumberMetadata_BJ.php b/src/data/PhoneNumberMetadata_BJ.php index 27352021..463e4fb0 100644 --- a/src/data/PhoneNumberMetadata_BJ.php +++ b/src/data/PhoneNumberMetadata_BJ.php @@ -22,7 +22,7 @@ ], 'mobile' => [ - 'NationalNumberPattern' => '(?:4[0-356]|[56]\\d|9[013-9])\\d{6}', + 'NationalNumberPattern' => '(?:4[0-6]|[56]\\d|9[013-9])\\d{6}', 'ExampleNumber' => '90011234', ], 'tollFree' => diff --git a/src/data/PhoneNumberMetadata_EH.php b/src/data/PhoneNumberMetadata_EH.php index 3a9ba46e..e46442eb 100644 --- a/src/data/PhoneNumberMetadata_EH.php +++ b/src/data/PhoneNumberMetadata_EH.php @@ -22,7 +22,7 @@ ], 'mobile' => [ - 'NationalNumberPattern' => '(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[017]\\d|2[0-2]|6[0-8]|8[0-3]))\\d{6}', + 'NationalNumberPattern' => '(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-2]|5[01]|8[0-3]))\\d{6}', 'ExampleNumber' => '650123456', ], 'tollFree' => diff --git a/src/data/PhoneNumberMetadata_GU.php b/src/data/PhoneNumberMetadata_GU.php index 3c60d175..3fbf178d 100644 --- a/src/data/PhoneNumberMetadata_GU.php +++ b/src/data/PhoneNumberMetadata_GU.php @@ -21,7 +21,7 @@ ], 'fixedLine' => [ - 'NationalNumberPattern' => '671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-46-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}', + 'NationalNumberPattern' => '671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-46-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}', 'ExampleNumber' => '6713001234', 'PossibleLengthLocalOnly' => [ @@ -30,7 +30,7 @@ ], 'mobile' => [ - 'NationalNumberPattern' => '671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-46-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}', + 'NationalNumberPattern' => '671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-46-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}', 'ExampleNumber' => '6713001234', 'PossibleLengthLocalOnly' => [ @@ -98,7 +98,7 @@ 'countryCode' => 1, 'internationalPrefix' => '011', 'nationalPrefix' => '1', - 'nationalPrefixForParsing' => '([3-9]\\d{6})$|1', + 'nationalPrefixForParsing' => '([2-9]\\d{6})$|1', 'nationalPrefixTransformRule' => '671$1', 'sameMobileAndFixedLinePattern' => true, 'numberFormat' => diff --git a/src/data/PhoneNumberMetadata_GY.php b/src/data/PhoneNumberMetadata_GY.php index 5d6356c5..c07a5596 100644 --- a/src/data/PhoneNumberMetadata_GY.php +++ b/src/data/PhoneNumberMetadata_GY.php @@ -9,7 +9,7 @@ return [ 'generalDesc' => [ - 'NationalNumberPattern' => '9008\\d{3}|(?:[2-467]\\d\\d|510|862)\\d{4}', + 'NationalNumberPattern' => '(?:[2-8]\\d{3}|9008)\\d{3}', 'PossibleLength' => [ 0 => 7, @@ -17,7 +17,7 @@ ], 'fixedLine' => [ - 'NationalNumberPattern' => '(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-24-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|77[1-57])\\d{4}', + 'NationalNumberPattern' => '(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|50[0-6]|77[1-57])\\d{4}', 'ExampleNumber' => '2201234', ], 'mobile' => @@ -27,7 +27,7 @@ ], 'tollFree' => [ - 'NationalNumberPattern' => '(?:289|862)\\d{4}', + 'NationalNumberPattern' => '(?:289|8(?:00|6[28]|88|99))\\d{4}', 'ExampleNumber' => '2891234', ], 'premiumRate' => @@ -51,10 +51,8 @@ ], 'voip' => [ - 'PossibleLength' => - [ - 0 => -1, - ], + 'NationalNumberPattern' => '515\\d{4}', + 'ExampleNumber' => '5151234', ], 'pager' => [ diff --git a/src/data/PhoneNumberMetadata_HK.php b/src/data/PhoneNumberMetadata_HK.php index a6a6271b..b54a0efa 100644 --- a/src/data/PhoneNumberMetadata_HK.php +++ b/src/data/PhoneNumberMetadata_HK.php @@ -31,7 +31,7 @@ ], 'mobile' => [ - 'NationalNumberPattern' => '(?:4(?:44[5-9]|6(?:0[0-7]|1[0-6]|4[0-57-9]|6[0-4]))|573[0-6]|6(?:26[013-8]|66[0-3])|70(?:7[1-5]|8[0-4])|848[0-25-9]|9(?:29[013-9]|59[0-4]))\\d{4}|(?:4(?:4[01]|6[23578])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|84[09]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}', + 'NationalNumberPattern' => '(?:4(?:44[5-9]|6(?:1[0-6]|4[0-57-9]|6[0-4]))|573[0-6]|6(?:26[013-8]|66[0-3])|70(?:7[1-5]|8[0-4])|848[0-25-9]|9(?:29[013-9]|59[0-4]|899))\\d{4}|(?:4(?:4[015]|6[023578])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|84[09]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}', 'ExampleNumber' => '51234567', 'PossibleLength' => [ diff --git a/src/data/PhoneNumberMetadata_MA.php b/src/data/PhoneNumberMetadata_MA.php index ef00f366..0ae6ab61 100644 --- a/src/data/PhoneNumberMetadata_MA.php +++ b/src/data/PhoneNumberMetadata_MA.php @@ -22,7 +22,7 @@ ], 'mobile' => [ - 'NationalNumberPattern' => '(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[017]\\d|2[0-2]|6[0-8]|8[0-3]))\\d{6}', + 'NationalNumberPattern' => '(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-2]|5[01]|8[0-3]))\\d{6}', 'ExampleNumber' => '650123456', ], 'tollFree' => diff --git a/src/data/PhoneNumberMetadata_NU.php b/src/data/PhoneNumberMetadata_NU.php index 766db011..1538986e 100644 --- a/src/data/PhoneNumberMetadata_NU.php +++ b/src/data/PhoneNumberMetadata_NU.php @@ -9,7 +9,7 @@ return [ 'generalDesc' => [ - 'NationalNumberPattern' => '(?:[47]|888\\d)\\d{3}', + 'NationalNumberPattern' => '(?:[4-7]|888\\d)\\d{3}', 'PossibleLength' => [ 0 => 4, @@ -27,12 +27,8 @@ ], 'mobile' => [ - 'NationalNumberPattern' => '888[1-9]\\d{3}', + 'NationalNumberPattern' => '(?:[56]|888[1-9])\\d{3}', 'ExampleNumber' => '8884012', - 'PossibleLength' => - [ - 0 => 7, - ], ], 'tollFree' => [ diff --git a/src/data/PhoneNumberMetadata_SG.php b/src/data/PhoneNumberMetadata_SG.php index 5f85ce75..5e6c6b50 100644 --- a/src/data/PhoneNumberMetadata_SG.php +++ b/src/data/PhoneNumberMetadata_SG.php @@ -28,7 +28,7 @@ ], 'mobile' => [ - 'NationalNumberPattern' => '8(?:08[01]|95[0-2])\\d{4}|(?:8(?:0[1-7]|[1-8]\\d|9[0-4])|9[0-8]\\d)\\d{5}', + 'NationalNumberPattern' => '8(?:08[013]|95[0-2])\\d{4}|(?:8(?:0[1-7]|[1-8]\\d|9[0-4])|9[0-8]\\d)\\d{5}', 'ExampleNumber' => '81234567', 'PossibleLength' => [ diff --git a/src/data/PhoneNumberMetadata_US.php b/src/data/PhoneNumberMetadata_US.php index 3aacd532..396cb1bb 100644 --- a/src/data/PhoneNumberMetadata_US.php +++ b/src/data/PhoneNumberMetadata_US.php @@ -21,7 +21,7 @@ ], 'fixedLine' => [ - 'NationalNumberPattern' => '5056(?:[0-35-9]\\d|4[468])\\d{4}|(?:4722|505[2-57-9]|983[29])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[0-2]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}', + 'NationalNumberPattern' => '(?:5056(?:[0-35-9]\\d|4[468])|73020\\d)\\d{4}|(?:4722|505[2-57-9]|983[289])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[0149]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}', 'ExampleNumber' => '2015550123', 'PossibleLengthLocalOnly' => [ @@ -30,7 +30,7 @@ ], 'mobile' => [ - 'NationalNumberPattern' => '5056(?:[0-35-9]\\d|4[468])\\d{4}|(?:4722|505[2-57-9]|983[29])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[0-2]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}', + 'NationalNumberPattern' => '(?:5056(?:[0-35-9]\\d|4[468])|73020\\d)\\d{4}|(?:4722|505[2-57-9]|983[289])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[0149]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}', 'ExampleNumber' => '2015550123', 'PossibleLengthLocalOnly' => [ diff --git a/src/data/PhoneNumberMetadata_VN.php b/src/data/PhoneNumberMetadata_VN.php index b330a031..fffeb663 100644 --- a/src/data/PhoneNumberMetadata_VN.php +++ b/src/data/PhoneNumberMetadata_VN.php @@ -29,7 +29,7 @@ ], 'mobile' => [ - 'NationalNumberPattern' => '(?:5(?:2[238]|59)|89[6-9]|99[013-9])\\d{6}|(?:3\\d|5[689]|7[06-9]|8[1-8]|9[0-8])\\d{7}', + 'NationalNumberPattern' => '(?:5(?:2[238]|59)|89[6-9]|99[013-9])\\d{6}|(?:3\\d|5[1689]|7[06-9]|8[1-8]|9[0-8])\\d{7}', 'ExampleNumber' => '912345678', 'PossibleLength' => [