Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Re: tic-tac-toe regex golf (bug)

by barrachois (Pilgrim)
on Nov 18, 2003 at 17:11 UTC ( #308042=note: print w/replies, xml ) Need Help??

in reply to Re: tic-tac-toe regex golf (bug)
in thread tic-tac-toe regex golf

Yes, thank you.

That was just pointed out to me by someone else as well, and I've put an addendum and correction into the original post accordingly.

Following Dave's suggestion to use \w instead of X|O, the shortest I'm currently aware of is this 57 char regex which lists out the two .{2,3} cases explicitly.


Replies are listed 'Best First'.
Re: Re: Re: tic-tac-toe regex golf (bug)
by Anonymous Monk on Nov 20, 2003 at 00:41 UTC
    Sometimes it helps to anchor from the other side:
    This 43 also gets rid of all those ugly different digits, in favor of pleasing uniformity :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://308042]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-11-24 05:39 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (344 votes). Check out past polls.