Skip to main content
cli-gamesGames

Regex Golf

One pattern. Two groups. The shortest clean win.

Best on desktopTrainingtrainingpuzzle

A regex that matches everything is easy. A regex that knows exactly what to reject is the game.

Read the examples, write a pattern, and test it against group A and group B. Every character counts: beat the known par for a bonus, or use a hint and pay for the help.

The terminal keeps the feedback direct so you can iterate on anchors, classes, alternation, and the smallest expression that tells the right story.

What you will see

ONE PATTERN, EVERY TARGET, FEWEST STROKESreplay
REGEX GOLF — SHELLLIVE

>

GAME // REGEX GOLF

 

The pattern is your club. Match everything on the left, touch nothing on the right.

How this command behaves

  • Built for a solo session
  • Save and resume your game
  • Track your statistics and high scores
  • Runs in the browser; nothing to install
  • Playable entirely from the keyboard

Start it from the prompt

Usage

regexgolf [savename]

Aliases

rg / regex

Opens the terminal in Regex Golf.

Run $ regexgolf