For six years, the site RegExCrossword.com has been offering crossword puzzles made from programming language regular expressions. “Welcome to the fantastic world of nerdy regex fun!” reads a greeting on its home page. It’s like a smaller version of a traditional crossword puzzle — except instead of using words for clues, the contents of each square are described using the familiar syntax for specifying a search pattern.
A perennial favorite, the site’s visitors have now submitted correct answers more than 1,193,436 times. There are over 57,254 registered players, representing a hardy and loyal following. A quick search shows it’s pages have been submitted to Hacker News at least 27 different times — and last week, the same URL finally received over 405 upvotes, and over 59 appreciative comments.
Over the years, it’s an idea that’s also fired the imagination of other geeks, spawning a very 21st-century folk celebration for the tools of our labors. It’s all proof that seeing regular expressions in a fun new context can be educational, cathartic, and occasionally even confidence-boosting. But does it also tell us something about our culture, delivering a fresh perspective on the way that we work using the way that we play?
To probe the tantalizing intrigue of regular expression puzzles, I tracked down software engineer Ole Michelsen, one of the co-founders of RegExCrossword, and asked him to tell me how it all began.
“The inspiration came from the MIT Mystery Hunt,” Michelsen tells me in an email. The hunt has been an annual tradition at the technology college since 1981. Each year MIT students tackle a surprising variety of mental challenges, according to the event’s website, including anagrams, number puzzles, scavenger hunts, and crossword puzzles.
The 2013 hunt had featured a record 150 puzzles — and Michelsen remembers that one of the puzzles was a hexagonal regex crossword.
“It was really fun to solve, and we thought that others might have fun solving some slightly easier versions.”
Ole teamed up with his wife Maria Hagsten Michelsen, whose Twitter profile describes her as “a passionate graphic designer and illustrator, who aims to improve the world through visionary and thoughtful design.” Together they decided to make a whole web site full of the crazy regular expression crossword puzzles. And in true geek fashion, they decided to add a few enhancements. Just one example: puzzles can be rotated to make it easier to read the clues…
— ▲ ● R C S I K (@aorcsik) July 16, 2014
“We also wanted puzzles that solved to a little word/sentence as a kind of prize.” For example, the solution to a puzzle named “Hamlet” might begin with the letters T-O-B-E-O-R-N-O-T-T-O-B-E…)
They also made sure that the puzzles were formatted for easy printing, so they could be printed out (and solved) on regular printer paper.
And when throngs of enthusiastic geeks started arriving to the site, “We soon realized that we needed an account and ranking/scoring system with trophies etc,” Ole wrote.
— Regex Crossword (@RegexCrossword) July 18, 2018
But the chief attraction has always been those bedeviling and carefully-constructed puzzles. “The challenge was making puzzles with red herrings but still only one valid solution,” Ole tells me. “We also wanted a gradual increase in difficulty through the challenges, so they all have different themes and difficulty level.
Secrets of the Site
There are now 55 “challenge” puzzles on the site — but that’s really just the beginning. Players can even submit their own puzzles, so there’s now 688 more player-submitted puzzles to choose from. “We have gotten so many great and creative puzzles from the community which is really the reason the site is still active,” Ole acknowledges.
I was once so bored at work I did the entire @RegexCrossword Not the user created ones though because y'all are some psychopaths.
— Heron Ziegel (@heron_ziegel) May 18, 2018
It’s built up a strong following. “At one point we got featured on the front of Hacker News, and it kinda took off from there,” Ole remembers, noting that in the years since, it’s been featured in some other fun contexts.
“At one point we learned that it was being used as course practice material at Berkeley’s Computer Science course. We were featured in the program of a Python conference in Holland. “And LinkedIn even used a copy of the idea for their engineering hiring process.”
— esth, esther, esthest (@ojahnn) May 19, 2015
And it’s also inspired other geeks to come up with their own creative solutions — and offering variations on the same crazy game. Last week on Hacker News, one fan even shared a linked to some code on GitHub they wrote that solves the puzzles by “generating a bunch of strings that match the regex, and then applying them as constraints.”
— Herman Schaaf (@ironzeb) December 15, 2014
And waiting in the GitHub repository of Noah Luck Easterly is a massive 127-cell hexagon puzzle — and a call for others to help create more.
There’s also a site for “Regex Golf,” where players lower their score by using fewer characters in a regular expression to match a long list of words (while not matching the other words on an equally long list).
RegExCrossword is a fun way for programmers to practice with the tools of their trade. It even offers a handy cheat sheet of regular expressions for its players. Just click the question-mark-in-a-circle in the page’s upper-right corner.
Even after six years, Ole is still dreaming of new ways to improve the site.
“Right now I’m working on a mobile version, which is a bit of a rethink since it’s hard to transfer that much complexity to a small screen,” he wrote.
But geeks gotta tinker, and that may be the most inspiring message of all.
He’s taken the act of creating a puzzle for geeks, and made it into an even geekier challenge.
Playing @RegexCrossword is the first time I've ever actually had fun while using regular expressions.
— emcoffey3 (@emcoffey3) December 4, 2015
- Real-world videogame simulators are paying homage to Nintendo’s Mario.
- How 150 Microsoft employees filmed Microsoft: the Musical.
- Xiaomi gets musical over its 100 millionth smartphone sales.
- The dance band YACHT creates a new album using machine-learning generated composition.
- A new book argues that the internet age has not destroyed the act of reading.
- When a 63-year-old Nobel prize-winning economist visits Burning Man.
The New Stack is a wholly owned subsidiary of Insight Partners, an investor in the following companies mentioned in this article: Real.