· Skillz · Regular expressions
Regex Rodeo: free game to learn regular expressions
Lasso every email, date and phone number in the herd, and leave the decoys alone.
What is Regex Rodeo?
Each herd mixes the strings you want, like emails, dates or phone numbers, with decoys that look almost right. Pick or build a regular expression and watch the matches light up live, then throw the lasso. A perfect throw catches the whole herd and no decoy.
Regex Rodeo is a free game to learn regular expressions, the patterns developers and analysts use to find text. Each round is a herd of strings: some you want, some decoys that look almost right.
Pick a pattern, or build one from token chips, and the matches light up live. The trick is the decoys: ".*@.*" catches every email, and a few things that aren't. Every round shows a pattern that works.
At a glance
- Category
- Skillz
- Difficulty
- Hard
- Play time
- 4–6 min
- Price
- Free, in your browser, sign-up optional
How to play
- Read the goal
- Each herd says what to catch: email addresses, YYYY-MM-DD dates, order IDs…
- Pick or build
- Choose a pattern, or in Expert build it from token chips. Matches light up as you go.
- Score
- 100 for a whole herd with no decoy; otherwise 15 per catch minus 25 per decoy.
- Three levels
- Beginner picks among three patterns with hints. Expert builds every pattern from chips in 75 seconds. Each level keeps its own best score.
Scoring
A perfect herd scores 100. Otherwise each catch scores 15 and each decoy caught costs 25, never below 0.
Four to six herds depending on the level, with 45 or 75 seconds per herd. Your best score is kept in this browser.
What it trains
- Regex tokens
- \d, \w, {n}, [ ] and escaped dots.
- Precision
- Matching exactly what you want and nothing else.
- Testing
- Checking a pattern against tricky decoys.
Strategy and tips
- \d is a digit
- \d{4} means exactly four digits.
- Escape the dot
- A dot on its own matches any character; \. is a real dot.
- Brackets list what's allowed
- [0-9a-fA-F] allows hex digits in either case.
- Test the decoys
- A pattern that catches everything is as bad as one that catches nothing.
Why play Regex Rodeo?
Regular expressions turn "find every date in this file" into one line. They look cryptic at first, but a handful of tokens covers most real jobs, and seeing them match live is the fastest way to learn.
Frequently asked questions
Is Regex Rodeo free?
Yes. It is free and runs in your browser, with no download. Signing up is optional.
Which regex flavour is it?
Standard JavaScript regular expressions, matched against the whole string.
Do I need to code?
No. You pick or assemble patterns from chips.
Why does my pattern catch decoys?
It's probably too loose: a dot or .* matches more than you think.