Test, validate and match regular expressions
Matches Chilean RUT (Rol Único Tributario) identification numbers in dotted format, e.g. 12.345.678-5 or 12.345.678-K, where the body is 1-10 characters of digits and dots, followed by a hyphen and a verification digit (0-9 or K). Intended for validating Chilean tax/personal ID input in forms, though it only checks format, not the checksum. Caveats: the character classes also match literal pipe characters, and the trailing space in the pattern requires whitespace after the check digit.