Your original fails in one case:
The parts above ^s are the problem. They require that, in a '.X..X..X.' type of solution that the two '..' parts be the same. So it won't match '-XO-X-OX-' even though it should./^(...)*(X|O)\2\2|(X|O)(.{2,3}\3)\4|^..(X|O).\5.\5/ # ^^^^^^ ^^
In reply to Re: tic-tac-toe regex golf (bug)
by tye
in thread tic-tac-toe regex golf
by barrachois
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |