Build, test, and debug regular expressions
Validates a string consisting of exactly 4 or exactly 6 digits, the typical rule for PIN codes. Anchors (^ and $) ensure no extra characters are allowed before or after the digits, while the non-capturing group alternates between the two allowed lengths. With the gm flags, it matches every line in multi-line input, making it the classic solution to the Codewars 'Regex validate PIN code' kata.