Closed rdb closed 4 years ago
I'd prefer to force everything to lower case, since that addresses one level of "how to compare two language codes" and seems to be allowed in the BCP47 spec.
see discussion on #161
I think we agreed that we should not enforce any case sensitiveness here so I'm merging this PR.
The current BCP 47 regex was just inherited from wherever it was taken from. This replaces it with a more complete RegEx, taken from this StackOverflow answer.
This regular expression is fairly relaxed and case-insensitive. We may want to reconsider that. I'll open a separate issue to discuss this.