Regular expressions look cryptic until you learn the handful of pieces they are built from. These guides cover the core syntax, capturing and named groups, lookahead and lookbehind, the greedy-versus-lazy distinction and the catastrophic backtracking to avoid, and why a giant email regex is the wrong tool. Every guide links the regex tester so you can try each pattern in your browser, where your text never leaves the page.
Regex Basics: Characters, Classes, Anchors, and Quantifiers
The core building blocks of regular expressions: literal characters, character classes, anchors, quantifiers, and the flags that change everything.
Capturing Groups, Named Groups, and Backreferences
How parentheses capture parts of a match, how to name them, how backreferences match repeated text, and how to use all three when replacing.
Lookahead and Lookbehind: Matching by Context
Lookarounds check what surrounds a position without consuming it. Learn positive and negative lookahead and lookbehind with practical examples.
Greedy, Lazy, and Catastrophic Backtracking
Why quantifiers grab as much as they can, how lazy matching reins them in, and how nested quantifiers cause the ReDoS slowdown to avoid.
Why You Should Not Validate Email With a Giant Regex
The full RFC email regex is thousands of characters, rejects valid addresses, accepts dead ones, and risks ReDoS. Here is what to do instead.
Tools in this guide