IsBcp47ForEnglish🔗
Check that the
text
corresponds to a BCP47 code for english.
Code
pattern = (
'^(en|EN)(-.*)?$'
)
return match(
pattern,
text
) is not None