Skip to content

Instantly share code, notes, and snippets.

@DZ-TM
DZ-TM / TicTacToe.md
Last active January 18, 2024 12:24
Explanation on how my TicTacToe RegEx works

Note

This gist covers how a TicTacToe regular expression I made works. It was made with a Golang flavour of RegEx in mind.

It is used to check if a player won or lost a TicTacToe game, or if it resulted in a draw.

You are expected to know a basic level of RegEx before reading this.

You can find the tests I made for the RegEx here.

When you have finished reading this gist, try making a RegEx to check if there is a win, loss or draw with connect4 - message me with your attempts and I will check them.