Optimal solution for Task 6 of https://regex101.com/quiz/6, beating s/(.)\1{2}/$1/g by one token.
s/(.)\1{2}/$1/g