RegexWars

About

If Codewars is a gym and regex101 is a workbench, RegexWars is a driving range.

Regular expressions are the one tool that turns up in every language, every codebase and a suspicious number of interviews — and almost nobody actually learns them. People copy a pattern off Stack Overflow, poke it until the tests go green, and move on. Six months later they do it again.

The reason is not that regex is hard. It is that there is nowhere to practise. Kata sites bury it inside general programming problems, where you can always sidestep it with a loop and a split. Testers like regex101 are excellent, but a tester has no opinion about whether you got it right — you supply the strings and mark your own homework.

So: a set of challenges where regex is the only tool, the test cases are already written, some of them are hidden so you cannot cheat by fitting the examples, and your score is how short you got it. That last part is what makes it a game rather than a worksheet. Passing is binary and quickly boring. Character count is not.

Who built it

I’m William Forty — twenty-odd years of engineering, currently building a portfolio of small products in the evenings and writing about it as The Random Coder. RegexWars started as a joke about solving Sudoku with a regular expression and turned into the thing I actually wanted to exist.

What it costs

Nothing, and there is no account to make. Because the only thing being executed is a regular expression — in your own browser — a solve costs me nothing to serve, so there is no honest reason to charge for one or to put a signup in front of it.

What is coming

More challenges, other regex dialects (PCRE and Python behave differently in ways worth knowing), community-written challenges, and head-to-head duels. In roughly that order, and only once each one is actually good.

→ Go and break something