Then factor out the common leading dots and the trailing ..\4s to save another 6:^(...)*(\w)\2\2|^..(\w).\3.\3|(\w)..\4..\4|(\w)...\5...\5 #becomes ^(...)*(\w)\2\2|^..(\w).\3.\3|(\w)(..\4..\4|...\4...\4)
^(...)*(\w)\2\2|^..(\w).\3.\3|(\w)..(\4|.\4.)..\4
In reply to Re: tic-tac-toe regex golf
by Roy Johnson
in thread tic-tac-toe regex golf
by barrachois
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |