/regex/ practice
Write regex that works on the data you have not seen yet.
Type a pattern, watch it highlight live, then check it against hidden test strings. 52 exercises, from character classes to lookbehinds.

Type it, see it, prove it.
- 01Read the taskA short, exact rule and a handful of lines that should and should not match.
- 02Write the patternMatches highlight on every line as you type, with a pass or fail mark beside each one.
- 03Pass the hidden testsCheck runs on lines you have not seen. Feedback names the line and the kind of mistake. Hints and a reference answer follow.
Five levels, from [a-z] to (?<=\$).
| 01 | Basics | Literals, the dot, character classes and ranges, negated classes, quantifiers, anchors and escaping special characters. |
| 02 | Groups and alternation | Capture and non-capturing groups, alternation and its precedence, backreferences and optional parts. |
| 03 | Real-world validation | US ZIP and ZIP+4, phone formats, dates with valid months and days, times, simple emails, hex colors, IPv4, slugs, SKUs and currency. |
| 04 | Extraction and cleanup | Log lines, key=value pairs, CSV fields, hashtags, host names, trimming and collapsing whitespace, reformatting dates and names. |
| 05 | Advanced | Lookahead and lookbehind, lazy versus greedy, named groups, password rules, word boundaries, the u flag and the m flag. |
Timed mode for real fluency.Each exercise gets a clock. Hints and answers stay locked until time is up, and your best times are kept.
Start free. Pay once it clicks.
Pro
- Groups, validation, extraction, cleanup and lookarounds
- Reference answers with explanations
- Progress, last patterns and best times saved to your account
Payments open soon. The free exercises work now.
Questions
Which regex flavor is this?
JavaScript, as built into every browser and Node.js. For everything taught here it behaves the same as PCRE (PHP, grep -P) and Python's re module, apart from small syntax details such as how named groups are written.
What are hidden test strings?
Each exercise is checked against the lines you see and against extra lines you do not see. A pattern that only lists the visible examples fails on the hidden ones, and you are told so. From the second failed try, one failing input is shown.
Who is this for?
Developers, data analysts and anyone who cleans text: validating form fields, pulling values out of logs, fixing spacing and dates in a spreadsheet export, or searching code.
Do I need an account?
No. The first five exercises work without one and save progress in your browser. A free account saves progress across devices, and Pro unlocks the rest.
How do I cancel the monthly plan?
Open Account and choose Cancel subscription. That is the whole process: you keep Pro until the end of the period you paid for and are not charged again. If Pro is not for you, you get a full refund within 14 days of paying.
What if my answer is right but marked wrong?
Answers are checked on the result they produce, not on how they are written, so any correct answer passes. If a check still gets it wrong, use the report link under the result. Reports are reviewed, and a check that is wrong gets fixed.