Loading

Loading missions...

Could not start

{{game.loadError}}

Back

{{game.levelAnnouncement}}

World {{game.level.worldId}} · {{game.worldNames[game.level.worldId]}}Level {{game.level.id}}/{{game.levels.length}}

{{game.level.title}}

XP{{game.progress.xp}}
Score{{game.progress.totalScore}}
Streak{{game.progress.streak}} day{{game.progress.streak === 1 ? '' : 's'}}
Daily goal

Build the habit, one mission at a time.

{{game.progress.dailyCompleted}} / {{game.progress.dailyGoal}}
{{game.dailyGoalMessage()}}
World {{worldId}}{{game.worldProgress(worldId).done}}/{{game.worldProgress(worldId).total}}
{{game.worldNames[worldId]}}

Mission data

{{game.level.difficulty}}
{{item.value}}{{item.explanation}}
{{segment.text}}
{{game.groupLabel(group)}}{{group.text}}
{{game.assertionLabel(assertion)}} · checks context without consuming
•✓×!—

Your Regex

Press Enter to run
/
Use the shortcuts below or type normally.
Mission complete
{{n <= game.score.stars ? '★' : '☆'}}

{{game.score.total}} points

{{game.level.explanation}}

Base+{{game.score.base}}
First try+{{game.score.firstTryBonus}}
No hints+{{game.score.noHintBonus}}
Efficient Regex+{{game.score.efficiencyBonus}}
Daily goal: {{game.progress.dailyCompleted}}/{{game.progress.dailyGoal}} missions today · 🔥 {{game.progress.streak}} day{{game.progress.streak === 1 ? '' : 's'}}
🏅 Achievement unlocked: {{achievement.title}}
{{achievement.text}}
View challenges
Achievements

Your Regex journey

{{game.completedCount()}}/24 missions completed
{{achievement.icon}}
{{achievement.title}}{{achievement.text}}
Progress is saved only in this browser.

How the 24 Regex levels teach you to reason

Each mission describes a goal and provides sample strings. You write a Regex, compare expected and unexpected matches, and use feedback to improve it. The activity runs in your browser and stores game progress locally.

A first mission, explained

In level 1, the objective is to find the literal sequence cat. The pattern cat finds it in catfish and bobcat, but not in dog. That is a search, not whole-string validation.

How to check your solution

  1. Check the strings that should match.
  2. Check the strings that must not match—false positives matter.
  3. Change one part of the pattern, then run it again to see whether the result improves.

The five learning worlds

  • World 1 — First matches: literals, wildcards and case
  • World 2 — Quantity control: ranges and repetition
  • World 3 — Classes and limits: choosing the allowed characters
  • World 4 — Groups and formats: capturing and validating structured inputs
  • World 5 — Real-world missions: lookarounds and combined constraints

Need a reference? Open the Regex Cheat Sheet, test a pattern in the Playground, or explore the 30 solved exercises.