in reply to tic-tac-toe regex golf
47 keystrokes:
^(...)*(X|O)\2\2|(X|O)(...?\3)\4|^..(X|O).\5.\5
If you can safely assume that "X" and "O" are the only "word" characters (alpha characters) found in the solution, you could save a few keystrokes like this (44 keystrokes):
^(...)*(\w)\2\2|(\w)(...?\3)\4|^..(\w).\5.\5
Note: In my solutions I made no attempt to verify the suitability of your original regex. I simply modified your regex in ways that preserved identical functionality in fewer keystrokes.
Dave
|
|---|