in reply to tic-tac-toe regex golf

The final alternation can be rewritten to save 2 keystrokes:
^(...)*(\w)\2\2|^..(\w).\3.\3|(\w)..\4..\4|(\w)...\5...\5 #becomes ^(...)*(\w)\2\2|^..(\w).\3.\3|(\w)(..\4..\4|...\4...\4)
Then factor out the common leading dots and the trailing ..\4s to save another 6:
^(...)*(\w)\2\2|^..(\w).\3.\3|(\w)..(\4|.\4.)..\4