Fix extension value assert regexps: they are "alphanum", not "alpha".
PiperOrigin-RevId: 241411050
diff --git a/lib/src/locale/locale_extensions.dart b/lib/src/locale/locale_extensions.dart
index 31ac841..4018ba5 100644
--- a/lib/src/locale/locale_extensions.dart
+++ b/lib/src/locale/locale_extensions.dart
@@ -85,7 +85,7 @@
//
// Must be static to get tree-shaken away in production code.
static final _uExtensionsValidValuesRE =
- RegExp(r'^[a-z]{3,8}([-][a-z]{3,8})*$');
+ RegExp(r'^[a-z\d]{3,8}([-][a-z\d]{3,8})*$');
/// For debug/assert-use only! Matches keys considered valid for
/// [_tExtensions], does not imply keys are valid as per Unicode LDML spec!
@@ -99,7 +99,7 @@
//
// Must be static to get tree-shaken away in production code.
static final _tExtensionsValidValuesRE =
- RegExp(r'^[a-z]{3,8}([-][a-z]{3,8})*$');
+ RegExp(r'^[a-z\d]{3,8}([-][a-z\d]{3,8})*$');
/// For debug/assert-use only! Matches keys considered valid for
/// [_otherExtensions], does not imply keys are valid as per Unicode LDML
diff --git a/test/locale_test_data.dart b/test/locale_test_data.dart
index 2786ba9..9cd6f70 100755
--- a/test/locale_test_data.dart
+++ b/test/locale_test_data.dart
@@ -46,6 +46,13 @@
// Private-use extension subtags do not get sorted
'en-x-BCDE0123-ABCD0123': 'en-x-bcde0123-abcd0123',
'en-x-BCDE0123-123456-ABCD0123': 'en-x-bcde0123-123456-abcd0123',
+
+ // Digits in u-extension values
+ 'en-u-hc-h11': 'en-u-hc-h11',
+ 'en-u-hc-h23': 'en-u-hc-h23',
+
+ // Digits in t-extension values
+ 'en-t-m0-c11': 'en-t-m0-c11',
};
/// Invalid Language Tags.