I need to verify input which is like en-US or en-us or ar-AE I have searched net and found it bit difficult to understand and create one regular expressing on string which is no more than 5 characters in length and should be case in-sensitive.
I created one [a-z][a-z][-][a-z][a-z] this one works fine but it doesn't check the length
it will match en-USXYZ also
Regards
zh-Hans- Chinese (Simplified)). Also, some cultures has three parts, such assr-Cyrl-BA- Serbian, Cyrillic alphabet (Bosnia and Herzegovina).