Regular expressions for matching IETF language tags (BCP 47)
npm install ietf-language-tag-regexietf-language-tag-regexBased on this Stack Overflow comment by George Pollard.
``js
const languageTagRegex = require('ietf-language-tag-regex')
languageTagRegex().test('en-GB') // true
languageTagRegex().test('a-DE') // false
languageTagRegex().test('zh-Hant') // true
`
Returns a regex for matching IETF language tags.
#### options
##### exact
Type: booleantrue
Default:
Only match an exact string. Useful with RegExp#test` to check if a string is a language tag.