Test, validate and match regular expressions
This regular expression validates the format of a Chilean RUN (Rol Único Nacional) or RUT (Rol Único Tributario), which serves as the national identification number in Chile. It matches a number formatted with dots separating thousands, followed by a hyphen and a single verification digit that can be either a number or the letter 'K'. It is highly useful for form validation, data entry verification, and parsing identification numbers from documents or databases.