Test, validate and match regular expressions
Matches lines that can be fully cleared Zuma-game style: repeatedly deleting runs of 3 or more identical adjacent characters reduces the entire string to empty. It captures a character in group 2, then matches either a direct run of 3+ (\2{2,}) or patterns like x + recursively clearable section + xx, so neighbors that merge after a removal (e.g. 'aabbbaa' -> 'aaaa' -> empty) are handled by the (?1) recursion inside an atomic group. Useful for validating boards in Zuma/bubble-shooter or 'remove adjacent duplicates' puzzle solvers, anchored with ^...$ under global multiline flags.