rfc5646extlang top-level property
final
As defined in RFC5646, Section 2.2.2. Extended language subtags
Implementation
final rfc5646extlang = rule(
'extlang',
concatenation([
repetition(alpha, 3),
negativeLookahead(alphanum),
variableRepetition(
concatenation([
literal('-'),
repetition(alpha, 3),
negativeLookahead(alphanum),
]),
max: 2,
),
]),
);