Can you solve this crossword where all hints are regular expressions?

Problem statement

Puzzle in the shape of an hexagonal tiled region where cells are supposed to be filled in with characters from the alphabet according to hints given as regular expressions.
The regex crossword puzzle grid.

At EuroPython 2024 I watched a lightning talk about the art of puzzle solving. In it, the speaker showed the regex crossword puzzle that you can see above, that I took from this URL. You are supposed to fill the hexagonal grid with letters so that all of the regular expressions shown match.

If you don't know regular expressions, the puzzle only uses a simple subset of the syntax:

  • literal character matches;
  • wildcard matches with .;
  • alternatives with |;
  • the quantifiers ?, +, and *;
  • character sets with [...] and negated character sets with [^...]; and
  • groups with () and group references with \1, \2, etc.

You can look this up and then you will be able to solve the challenge. You can also use the site regex101 to help you check what each regular expression means.

Give it some thought!

Solution

In the spirit of the puzzle hunting community, I will not share my solved grid here. If you need help, feel free to email me and we can talk it over.

P.S. if I understood correctly, in the puzzle hunting community you're not supposed to just fill in the grid. In some way, somehow, you are supposed to be able to extract an English word or phrase from that filled puzzle without any extra information, and then you check that you got it correctly by “checking your answer spoiler-free” in the website where I took the regex crossword from I am still stuck in that step!

Become a better Python 🐍 developer 🚀

+35 chapters. +400 pages. Hundreds of examples. Over 30,000 readers!

My book “Pydon'ts” teaches you how to write elegant, expressive, and Pythonic code, to help you become a better developer. >>> Download it here 🐍🚀.

Previous Post

Blog Comments powered by Disqus.