Pattern Hunter

Craft a single regex that catches all the green words, skips all the red ones, then shrink it under par.

Was this fun?
How to play

You get two word lists: must-match (green) and must-not-match (red). Type one regular expression that matches every green word and none of the reds. The words light up live as you type. Once it separates them, shorten your pattern to beat the par length.

Controls
Game modes
Tips & strategy
What you'll learn

Pattern Hunter is regex golf, a code-golf puzzle about expressive, minimal pattern matching.

Origins

Writing one regular expression that matches every word on a green list and none on a red one is the real task the notation exists for: describing a set of strings precisely.

The two lists are doing the work of a specification. Without the red list any pattern that matches everything would pass, which is the commonest way a real regex goes wrong.

That tension between too permissive and too strict is the whole craft, and it is why the Kleene star — match any number of these, including none — is both the notation's most useful operator and the one that causes the most accidents.

About Pattern Hunter

Pattern Hunter is regex golf: a code-golf puzzle about expressive, minimal pattern matching. It is an original, free browser game built in-house for PlayPendium.

A free, original browser game on PlayPendium. No download, no install.

PlayPendium
About this game ↓
PlayPendium · About · Contact · Privacy · Terms · Cookies · Accessibility · Copyright · Browse all games · Classic arcade games · © 2026