Free game · 60 seconds
🥷 Regex Ninja
Write one regular expression that matches everything in the green list and nothing in the red list. Ten levels, five minutes, and shorter regex earns bigger bonuses.
Level 1/10Score 0⏱ 5:00
Contains cat
✅ Must match
🚫 Must not match
Regex Ninja
- Write a regex that matches every word in the green list.
- It must match none of the words in the red list.
- Shorter regex and faster solves earn bonus points.
- 10 levels, 5 minutes. Press Enter to submit.
How it checks your regex
Each word is tested with JavaScript's RegExp.test(), so a pattern can match anywhere in the word unless you anchor it with ^ and $. Flags are not needed for any level.
Regex in real projects
I use patterns like these every week to validate phone numbers, emails, hex colours and version strings in forms and APIs. Need validation that actually works? Talk to me.