Regex challenges
A regular expression is a tiny language for describing shapes of text. It is worth learning because it appears in every editor, language and log tool, and worth using carefully because it is easy to write and hard to read.
What you'll learn
10 chapters, then the quiz
- 01What a regex isPatterns, not programs.
- 02Literals and classesMatching characters.
- 03QuantifiersHow many times.
- 04Anchors and boundariesMatching positions.
- 05Groups and alternationStructure inside a pattern.
- 06EscapingMatching the special characters themselves.
- 07LookaroundChecking without consuming.
- 08FlagsChanging how the whole pattern behaves.
- 09When regex goes wrongCatastrophic backtracking.
- 10Writing readable patternsFor the person reading it later.
More programming tests
See all →- Easy
JavaScript fundamentals
Types, scope and the small surprises the language is famous for.
8 questions6 min - Easy
Python essentials
Syntax, built-in types and the everyday behaviour of the standard library.
8 questions6 min - Hard
Complexity and Big O
How algorithms behave when the input stops being small.
7 questions8 min