Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex pattern used for region tag in CanonicalizeLanguageTag #69

Closed
yumaoka opened this issue Sep 29, 2014 · 0 comments
Closed

Regex pattern used for region tag in CanonicalizeLanguageTag #69

yumaoka opened this issue Sep 29, 2014 · 0 comments
Labels

Comments

@yumaoka
Copy link

yumaoka commented Sep 29, 2014

In CanonicalizeLanguageTag:

[https://github.com/ibm-js/ecma402/blob/master/impl/common.js#L183]

var regionTag = /(?:-)([a-z]{2})(?=(-|$))/g;

This regex pattern would not be sufficient to parse a region subtag with 3 letter numeric code (such as 419).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants