
Regex Crossword - anewhnaccount
http://www.regexcrossword.com/
======
pyroMax
How about you save my progress in a cookie?

You might find this hard to believe, but I don't have a Facebook account.

~~~
karma89
Off topic, but god I just wish Facebook would disappear. It's ironic that such
a popular company with such a huge valuation would produce an immediate and
significant benefit to me if it just disappeared overnight.

~~~
jplahn
It begs the question, do you mean Facebook the social network, or Facebook the
company? Because there are surely many benefits coming from the company that
don't necessarily depend on the social network.

~~~
karma89
It's hard to imagine one existing without the other

~~~
jplahn
I think one existing without the other could certainly be the case in the
nearish future. Not everything they're doing is tied into the Facebook site.

------
jfmercer
This is fantastic work. Many thanks. One request though: please add one or
more alternate logins than Facebook.

~~~
tokenizerrr
Yeah, this. Especially for something like regexes where a large amount of your
users will be more technical, and facebook is becoming less and less popular
among technical people.

Personally, I don't have a facebook account and I will not create one just so
I can log in on your website. The disability to save my progress also made me
give up on trying to progress since it'd just be lost anyway.

------
Robadob
My main problem with this is telling the difference between O and 0, the clue
O's look more like 0 so I have to copy paste them. (Although I don't think
I've had any numbers required for solutions yet).

~~~
Bahamut
The zeroes have a slash through them on my browser - does yours not have that?

~~~
quink
Mine too. Although when you've got [0-3] and [^2O13] in the other, it's not
too difficult to figure out that contradiction fairly quickly.

------
throwaway_yy2Di
These crosswords are NP-hard! D: Here's a short encoding of 3SAT:

Alphabet: [01]

Number of variables: N

Columns: one for each clause, i.e.:

    
    
        r/.0...|..1..|....1/
        
        (-x2 V x3 V x5)
    

They're disjunctions of three regexps of length N. Each alternative fixes one
positional variable to either 0 or 1, and ignores the rest.

Rows: one for each variable, forcing it to be single-valued across the
clauses:

    
    
        r/0+|1+/

~~~
schoen
Well, that sure cured me of the intuition that these square grid regexp
crossword puzzles were inherently easier than the original hexagonal grid
version!

------
TylerJay
Nice work overall. That was fun.

Just a heads-up though: There are some typos and grammar mistakes in your
explanations, so if you plan to share professionally, you might want to have
someone proofread it. Also, your Facebook OAuth window that pops up upon page
load is being caught by Chrome's built-in popup blocker. Either way though,
I'm always disappointed when Facebook OAuth is the only login method. I get
that it's easy to implement, but I can't imagine this is a very security-
sensitive app in terms of user-accounts. I would like to save my progress, but
it's not worth the risk or analysis required to hook up my Facebook.

------
maaaats
The ability to rotate was really sweet. Fun challenge, some syntax I wasn't
sure about (back referencing) but now probably will remember.

------
natch
Nice, but the answers being phrases ruins it for me, because you start seeing
the answers without needed to check the regular expressions.

Really nicely designed though. Clean UI. Wouldn't mind if it was enlarged to
use more of the screen real estate (tiny fonts are hard to read). I had fun
with this.

~~~
paco3346
I thought about this too- the phrases- but, isn't that how normal crossword
puzzles are? You can gather clues from the context of surrounding words when
doing one of those puzzles.

~~~
natch
Not really, because rather than using an entire coherent phrase that goes from
the top to the bottom of the puzzle, crossword puzzles use discrete and often
unrelated words throughout.

~~~
schoen
It's most like a theme clue -- in an American-style crossword you often have 1
to 4 extra-long answers, almost always horizontal, that are related to a theme
(they might be puns, or proverbial sayings, or together spell out a longer
quote). It's sometimes possible to solve a theme clue in a crossword when you
have only a few letters, if you understand the theme well enough.

In this case, the "suddenly solving the whole thing given only 40% or 50% of
the letters" effect can be kind of cool, or annoying if you were enjoying the
logic puzzle aspect. In the original MIT Mystery Hunt hexagonal regular
expression crossword, most of the grid did _not_ spell anything recognizable,
so it was clearly a logic puzzle through-and-through. I guess whether people
appreciate that depends on whether they were expecting a pure logic puzzle or
a combined logic+word puzzle.

------
yoha
It would be nice to be switched to the next level automatically.

~~~
Adrien_L
I was also expecting it to advance me automatically to the next level.

A bit of customisation of the default bootstrap look would have been nice too.

------
FrankenPC
In case there is someone out there who never saw MIT's entry into the RegEx
competition:
[http://rampion.github.io/RegHex/](http://rampion.github.io/RegHex/)

This is the web incarnation of that hexagon puzzle.

~~~
schoen
The MIT puzzle (from the 2013 Mystery Hunt) was called "A Regular Crossword"
and its credit says "Dan Gulotta, based on an idea by Palmer Mebane".

(Just so it's not credited to MIT in general; each year's Mystery Hunt is
written by a specific puzzle team, and indeed each puzzle is written by
specific puzzlers!)

~~~
schoen
This new site is super-awesome and challenging, but a great thing about the
hexagonal grid in "A Regular Crossword" was that each hexagon was constrained
by _three_ intersecting regular expressions rather than two. That meant that
the constraints could be trickier or vaguer in some ways, and comparatively
more dependent on the sequence of elements within a regular expression rather
than on the process of elimination between two intersecting sets.

~~~
schoen
Elsewhere in this thread, a commenter points out that the square grid regular
expression puzzle can encode 3SAT instances, so I was wrong to call these
easier than the hexagonal version.

------
toastedzergling
I really dislike that patterns using * wildcard required using the letters
beforehand. The game requires A* to match a row with zero or more A's, but
this is absolutely incorrect, as A* will gladly match ANY string, like QQQQ.

~~~
mgraczyk
That isn't how the Kleene star works.

A* is "the set of all strings over the alphabet {A}, including the empty
string ε."

"QQQQ" is not a string over the alphabet {A} because it contains the symbol
'Q', which is not in {A}.

~~~
toastedzergling
I have no idea what you're talking about. My point is more pragmatic the regex
/A _/ will match the string "QQQQ" and this tool doesn't take that into
account. E.g., I type this into my javascript console:

    
    
         /A*/.test('QQQQ');
         > true
    

Showing that yes, /A_/ does match 'QQQQ'

~~~
mgraczyk
No, it doesn't. It matches the empty string at the beginning of 'QQQQ', not
the Qs themselves:

    
    
        /A*/.exec('QQQQ')
        [""]
    

When computer scientists discuss what a regular express does and does not
"match", they are saying that strings which are "matched" by a regex are those
strings which are members of the regular language defined by the regex. QQQQ
is not a string in the language defined by /A* /, so /A* / does not match
QQQQ.

If we look at things your way, we would have to say that the regex /A/ matches
"AQQQQ". It does not. It matches "A".

------
ryanlschneider
Fun! When I saw the title, I was expecting the opposite: a normal cross word
with the usual "42 Across (4): It gets things done" style hints, but the
answers were valid regex's. Someone make that too!

~~~
eru
Regular crossword entries (that only have letters in them) are already valid
regexen.

------
source99
Pretty cool but I don't feel like I am actually learning regex. I think the
explanations/definitions need to be more clear and probably the answers less
easy to guess.

------
Adrien_L
That was fun (in a really nerdy way)! I'm currently trying to educate one of
my team member about regular expressions, this could be a fun way to get him
practicing.

------
kowdermeister
What's wrong on beginner / 01? :D
[http://imgur.com/eJBJYSx](http://imgur.com/eJBJYSx)

~~~
DCoder
It's not mentioned explicitly, but the given patterns should match the
_entire_ answer, not just part of it. In your screenshot, "O+" means "one or
more letters `O`" , it does not mention any `E` s, so OE is not a valid
answer.

When you're testing your answers, add explicit start/end anchors and implicit
grouping to get better results:

    
    
        var r = /^(?:HE|LL|O+)$/;
        console.log("OE".match(r));
        console.log("OO".match(r));

------
_jb
So I had a bunch of important stuff to get done today, but now I know what
I'll do instead. This is so much fun, well done!

------
mbillie1
I made it to
[http://regexcrossword.com/challenges/experienced/puzzles/4](http://regexcrossword.com/challenges/experienced/puzzles/4)
before I opted to keep my sanity for the remainder of the day instead of
continuing :) very well done. As noted, add non-FB login options!

------
almost
Cool!

I had a lot of fun writing a solver in Haskell for a crossword like this a few
months ago. Apologies for the self promotion but here's a link to the article
I wrote about it [http://almostobsolete.net/regex-
crossword/part1.html](http://almostobsolete.net/regex-crossword/part1.html)

------
kazinator
This is good homework/quiz stuff if you're teaching people regexes, just to
spice things up a little bit.

------
xorcist
I want to be able to return later, but it's a bit too much to register a
Facebook account (which you presumably can't do with a throwaway address?).

I'd be happy to donate more than whatever Facebook pays you for every newly
registered account if you would implement a simpler method.

~~~
kowdermeister
How is this too much? FB reg is the simplest way possible online to create an
account anywhere.

~~~
lifthrasiir
There are lots of people who simply don't want to give anything to FB. You
don't have to be one of them but you at least have to recognize them.

------
Edmontonian
Wish there were an offline open source version.

With the exception of DHH, do they believe in Open Source in Denmark? (jk)

------
baby
[http://regexcrossword.com/challenges/intermediate/puzzles/5](http://regexcrossword.com/challenges/intermediate/puzzles/5)

Anyone understand what (.)*DO\1 should match?

edit: Okay, I was writting 0 instead of O that's why it wasn't working.

~~~
cataflam
. -> any character

(.) -> any character, grouped to reference it, since it's the first group it's
referenced as \1

(.)* -> that, 0 or more times

(.)* DO -> any character 0 or more times, followed by DO

(.)* DO\1 -> any character 0 or more times, followed by DO, and the same
character as in the beginning

~~~
eru
By the way, the backreferences make the game non-regular.

------
Edmontonian
What does it mean when a reg ex ends with a `\1` (backslash 1) as in this
example third beginner puzzle? (.)+\1

[http://regexcrossword.com/challenges/beginner/puzzles/3](http://regexcrossword.com/challenges/beginner/puzzles/3)

~~~
tlrobinson
It's a backreference to the first capture group, which is denoted by the first
set of parenthesis, e.x.

    
    
        (.*)+\1
    

would match "ABAB", or "ABCABC", etc.

"\2" would match the second capture group, e.x.

    
    
        (.*)(.*)\2\1
    

would match "ABBA", or "AABBBBAA", etc.

~~~
Edmontonian
so in your first example, "AB" was in the capture group and the \1 repeats it?

~~~
tlrobinson
Correct. The following

    
    
        (.*)\1+
    

Would also match "ABABAB", for example.

------
Edmontonian
I got the solution but didn't understand it for the beginner "naughty" puzzle
...
[http://regexcrossword.com/challenges/beginner/puzzles/2](http://regexcrossword.com/challenges/beginner/puzzles/2)

------
kf5jak
I learned regex this way about a year ago. First I went through the tutorials
on [http://regexone.com/](http://regexone.com/), then started working the
puzzles to burn it in. Really easy and useful once you understand it!

------
jordanpg
This highlights how crossword puzzles are a valuable way to stretch the mind
laterally. This is a way to think about regexes that rarely comes up in
practice: comparing one regex against another unrelated one.

------
mfsch
Cool game, it really helped me brush up my regex skills.

I think I found an error in “The Lektor Device“: The “I“ in “WITH” could also
be a “T” from the rules, but only the “I” is accepted.

~~~
kbuck
The "I" can't be "T" because the regex on the bottom (.(\sSAI).*) forces it to
be "I".

~~~
vsah
No in this case the regex on the bottom only applies the . to the square in
question while the \sSAI in question applies to the second square. It seems
that it could be a I or a T.

~~~
kbuck
(\sSAI) is a group, not a character class. It matches the fixed string " SAI"
and stores it in a group. If it were [\sSAI], you'd be correct.

------
greenyouse
This is fun! I feel like it is also good practice for logic programming too.
Combine the regexes and put one or all possible solutions into each cell of
the matrix :)

------
jpetersonmn
No facebook account here either. Would be nice to be able to sign up with
email or log in with google.

------
jacksondc
I reluctantly logged in with Facebook and lost all my progress .

------
simarpreet007
Closed as soon as I saw the Facebook login needed prompt.

------
kercker
Funny, instructive.

Good to practise regular expressions.

------
klausseiler
i don't know how to solve beginner 4? shouldn't you be able to put anything
into it?

~~~
Robadob

        * *
        / /
    
    

/ isn't a special character and * isn't special when inside a character class

~~~
schoen
Now here's a puzzle where the "post your solutions in ROT13 to avoid spoilers"
conventional wisdom wouldn't help!

~~~
cogburnd02
ROT47 solves this exact problem.

~~~
schoen
Wow, thanks for the reference! I had no idea.

------
dankohn1
Challenging and impressive.

------
ukd1
That was pretty fun!

------
spacefight
"Notice! In order to save your progress you have to login with Facebook."

Yeah, maybe... let me check: NOPE.

~~~
timdorr
I really wish Facebook's Anonymous Login would make it out of beta so this
wouldn't be an issue: [https://developers.facebook.com/products/anonymous-
login/](https://developers.facebook.com/products/anonymous-login/)

~~~
cebe
still facebook will know where you have been. "Anonymous" and "Facebook" do
not really fit together ;)

~~~
timdorr
They already do. They have Like buttons _everywhere_ on the web.

But Facebook does have a good security track record. This random website does
not. I don't trust them with any more information than needed. In this case,
that is only a single anonymized token.

