Marius Schulz
Marius Schulz
Software Engineer

Step Up Your Game with Weekly Regular Expression Challenges

People seem to have strong opinions about regular expressions. While some love them, others avoid using them at all costs. Personally, I enjoy writing them, which is why I want to point you to Regex Tuesday, a compelling way to improve your regular expression skills.

A Weekly Regular Expression Challenge #

Every Tuesday, Callum Macrae, the guy behind Regex Tuesday, releases a new challenge on the GitHub project page. There, he describes the project as follows:

Regex Tuesday is the day where everyone writes regex for a day! Every Tuesday, I will push a new challenge to this website. They can be easy or tricky, and there is sure to be a variety of different challenges available.

Depending on the problem, you have to come up with a regular expression that either matches a given selection of the input strings or correctly replaces parts of each string. You're given a bunch of test cases for each problem and try to get as many of them as you can to pass.

Regex Tuesday Evaluation

Examples of Challenge Problems #

At the time of writing, past challenges included ...

Some of the challenges are harder to solve than others, and since I'm far from being a regular expression expert myself, it took me some time and thought to come up with a solution. (Yes, I'm talking about you, Markdown!)

If you want to save your solutions to the challenges or share them with others, you can also generate a permalink containing your regular expression.

Keep Practicing with Your Tools #

Regular expressions are one of many tools in a programmer's toolbox. They're definitely not the solution to all problems, but they do have their uses. Like a hammer, they're not useful for cutting down trees; for that, you need an axe. When faced with a nail, though, knowing how to use a hammer comes in handy. So I encourage you to keep improving your regular expression skills and tackle the first week's Regex Tuesday challenge!