Build, test, and debug regular expressions
This regular expression validates locale codes consisting of a two-letter lowercase ISO 639-1 language code followed by a hyphen and a two-letter uppercase ISO 3166-1 country code. Common examples include 'en-US', 'fr-FR', and 'zh-CN'. It's ideal for validating locale identifiers in internationalization (i18n) systems, user preference settings, or content management systems.