Monday, February 1

Crosswords Help You Learn Regular Expressions

Regular expressions might seem arcane, but if you do any kind of software, they are a powerful hacker tool. Obviously, if you are writing software or using tools like grep, awk, sed, Perl, or just about any programming language, regular expressions can simplify many tasks. Even if you don’t need them directly, regular expression searches can help you analyze source code, search through net lists, or even analyze data captured from sensors.

If you’ve been using regular expressions for a long time, they aren’t very hard. But learning them for the first time can be tedious. Unless you try your hand at regular expression crosswords. The clues are regular expressions and the rows and columns all have to match the corresponding regular expressions.

For example, consider this puzzle (which is already filled out):

crossex

This puzzle has a theme (The Beatles). The first across clue says that the two characters have to be an HE or an LL or one or more Os (two, then, in this case). The first down clue says the characters can’t be S, P, E, A, or K. So even though the second across clue says the lower left cell could be an A (in PLEASE), that would violate the down clue.

Of course, this is a super simple puzzle, but the site has many more puzzles of increasing difficulty. If you prefer your puzzles in hardware, that’s ok. If you want to work a different kind of puzzle, you might look at our Omnibus.


Filed under: Software Development

No comments:

Post a Comment