Skip to content

Commit afd29bd

Browse files
authored
Merge branch 'master' into extension-formatting
2 parents e163288 + 36db917 commit afd29bd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

javascript/i18n/phonenumbers/phonenumberutil.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4759,8 +4759,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.canBeInternationallyDialled =
47594759
*/
47604760
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely = function(regex, str) {
47614761
/** @type {Array.<string>} */
4762-
var matchedGroups = (typeof regex == 'string') ?
4763-
str.match('^(?:' + regex + ')$') : str.match(regex);
4762+
var matchedGroups = str.match(new RegExp('^(?:' + (typeof regex == 'string' ? regex : regex.source) + ')$', 'i'));
47644763
if (matchedGroups && matchedGroups[0].length == str.length) {
47654764
return true;
47664765
}

0 commit comments

Comments
 (0)