Regex RunnerArcade · ZainSpire ← Library

Lane runner · real Python 3 in your browser

Match the pattern.
Pick the lane.

Every gate is a regular expression. Three lanes, three strings, and only one matches the whole pattern. Switch Rex into it before the gate reaches you. Each check runs re.fullmatch in real Python 3, and the console shows you exactly what Python said.

Score

0

Level

1 literals

Lives

Streak · best

0 · —

Regex Runner

Booting Python

› downloading Python 3 (first time ≈ 6 MB)
← → or A D switch lane1 2 3 jump to laneP pause
Download with desktop version ↓

How it plays

One lane matches. Find it.

A gate comes down the road with a pattern on top and a string over each lane. Steer Rex, the runner, into the lane whose string matches the whole pattern. Right lane: points and a longer streak. Wrong lane: you lose a life and the console shows why. On a phone, tap a lane or swipe.

What you learn

Six levels of regex

  • Literals and any characterc.t
  • Character classes[bcr]at
  • Repeatsgo+l
  • Exact counts\d{3}
  • Groups and either/or(ha)+
  • Real-world checks#[0-9a-f]{6}

Why Python

Same rules, browser or desktop

The game rules live in one file, rules.py. In the browser it runs on Pyodide, which is Python compiled to WebAssembly. The download also has regex_runner.py, a pygame version that imports the same file. Run pip install pygame, then python regex_runner.py.