All practice
Regex Practice
Hands-on regular-expression lessons - write real patterns, run them instantly, and get checked by real tests.
Regex Practice
Fourteen short, hands-on regex lessons, from your first .test() call to
lookahead, backreferences, and capstones that pull real data out of messy
text. Each lesson gives you a task and a Run button - your code is checked
against real tests the moment you run it. Everything runs in your browser.
Already read Regular Expressions, Explained? This is where that theory turns into muscle memory. Start with lesson 1 - you can leave and come back any time, your code is saved locally.
Lessons
14 total- 01 Literal matching and .test()
- 02 Character classes
- 03 Quantifiers
- 04 Anchors and boundaries
- 05 Groups and capture
- 06 Practical validation
- 07 Capstone: extracting prices
- 08 Capstone: normalizing usernames
- 09 Lookahead
- 10 Backreferences
- 11 Greedy vs. lazy quantifiers
- 12 Global flag: find and replace all
- 13 Capstone: reformatting names
- 14 Fix the bug: the pattern that accepts junk