Regular expressions provide a great power to deal with strings, getting familiar with them will help you solve problems in an easier way.
The options I had were: Determine if the user belongs to:
- Spain or Latin America
- German speaking Europe, French speaking territories, Eastern Europe, Ex-URSS, The Netherlands
- English, French and German Speaking territories
The idea of the script is to read the input (the locale entered) and determine if it fits any criteria mentioned above.
Repo at github: https://github.com/maxcabrera/regex-locale