Make `alphanum` a non-capturing group

This commit is contained in:
Alexey Shvayka 2020-04-27 14:05:22 +03:00 committed by Rick Waldron
parent 4371e3ae36
commit d3b3e5e586
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ function isCanonicalizedStructurallyValidLanguageTag(locale) {
*/
var alpha = "[a-z]",
digit = "[0-9]",
alphanum = "(" + alpha + "|" + digit + ")",
alphanum = "(?:" + alpha + "|" + digit + ")",
variant = "(" + alphanum + "{5,8}|(?:" + digit + alphanum + "{3}))",
region = "(" + alpha + "{2}|" + digit + "{3})",
script = "(" + alpha + "{4})",