Playing with RegEx Soup

This weekend, I spent several hours watching video tutorials on Regular Expressions, aka RegEx(es?). I found myself quite excited about the idea; in fact, it seemed to me something with a lot of potential for unlocking the power of using code. My initial impression was that I was surprised I hadn’t heard about this before. However, having practiced HTML since the mid-90s, I knew there were special characters for things like signifying spaces and ‘escaping’ out of characters, so it made sense that such an abbreviated way existed.

Screen Shot of (part of) my RegEx Notes
Screen Shot of (part of) my RegEx Notes

So, about four to five hours of coding videos and following along left me with several pages of notes full of symbols, tips, tricks, and even traps you can find yourself in if you’re not careful. Following along with the videos, I found most of my mistakes were just like most of my other coding mistakes—typos and missed characters. Going back through and reading each piece as its own part really helped me better grasp how RegExes work; however, despite my great investment of time and energy, I was still tripping up when practicing.

I decided that rewatching the videos—something I’ve done for many things, many times—was no longer giving me great returns on my aforementioned investments, so I decided to put it into practice. Being a games/puzzles person I decided to go for putting my new skills into practice on the Regular Expression Crossword page provided in the syllabus.

Screen Shot RegEx Crossword Puzzle Play
Screen Shot RegEx Crossword Puzzle Play

It took me a bit to get a hang of the play. I kept getting really frustrated at the game and the lack of rules/info on the page. I hung in there, though. It wasn’t until I realized that the order of the parts signified the progression of the matching in the expression; this changed everything for me…. so simple, but somehow previously illusive. I depended a lot on Google for searching through examples that might have helped. Eventually, I started going through each RegEx, piece by piece—just like when I was following along with the videos, which made a huge difference. Ironically, the later, longer puzzles I finished more quickly than the shorter puzzles in the first half.

Screen Shot RegEx Crossword Puzzle Play. This is what success looks like! Whoo-hoo-hoo!
Screen Shot RegEx Crossword Puzzle Play. This is what success looks like! Whoo-hoo-hoo!

I feel marinated in the topic well-enough that I’m ready to put this to practice and look forward to using this mighty means in future projects!