A Puzzle for Learning Regular Expressions

Well, now that we have put in a few hard-working days this year already, it’s time for a break, don’t you think? And why not something that’s fun, that we could also—maybe if we stretch the rules a bit—count as work. This is a fun game that I’ve become quite intent on winning. I’m not doing so well, but I’m having a blast. Ready? It’s a RegEx crossword! Well, more like sudoku. Using regular expressions. Um, what?

For any of you GREP-ophiles like myself, you’re already jumping up and down. If the idea of GREP scares you, or you’re thinking, “GREP? RegEx?!” pay attention. RegEx is short for Regular Expressions—the “RE” in GREP—and in its simplest definition is the sequence of characters that define a pattern. GREP is used in InDesign to find patterns of text, then do something to that found text. This online puzzle challenge forces you to see those patterns.
The RegEx Crossword puzzle challenge is done a bit like a crossword puzzle with clues running across and down, but it also feels a bit like sudoku. Start with the tutorial’s easy 2 x 2 grid to help you get the feel for how it works. If you are not sure of an expression’s meaning, use the handy pop-out help menu. I’ve had to reference this a bit, as InDesign uses a subset of GREP and some of the puzzle’s expressions differ from what I’m familiar with. There are multiple levels, each one adding more rows, columns, and more involved expressions. Each puzzle has a hint which the final puzzle spells out. I’d love an option to hide that, as I’ve inferred the answer from seeing the hint.
You know you need a break from all this new year’s momentum, so get thee to a web browser! Last one to solve the “Hamlet” level is a rotten egg.

Posted on: January 7, 2016

Erica Gamet

Erica Gamet has been involved in the graphics industry for over 25 years. She is a speaker, writer, and trainer, focusing on Adobe InDesign and Illustrator, Apple Keynote and iBooks Author, and other print- and production-related topics. She is a regular contributor to InDesign Magazine, tech edited How To Do Everything with Adobe InDesign CS4, and served as leader of the Denver InDesign User Group. After living as a nomad for almost a year, she recently put down roots in El Paso, Texas, where she hikes and bikes every chance she gets. Check out ericagamet.com to see all of Erica's upcoming events, tips and tricks, and workbooks.

1 Comment on A Puzzle for Learning Regular Expressions

  1. Alan Gilbertson

    January 8, 2016 at 6:41 pm

    Love it! Reminds me why InDesign’s special version used to mess with my head once in a while. 🙂

Leave a comment

Your email address will not be published.