Build, test, and debug regular expressions
This regex matches lines containing one to three words separated by hyphens. It is specifically tailored to validate French compass directions like 'Nord', 'Sud-Est', or 'Nord-Nord-Ouest', limiting the combinations to a maximum of three parts. The global and multiline flags allow it to evaluate multiple directions across a list or document simultaneously.