Regex Cheat Sheet
Every token with a plain-English meaning and an example. Type to filter — try "lookahead", "digit" or "\b".
Frequently asked questions
Greedy vs lazy — what's the difference?
Greedy quantifiers (.*) match as much as possible; adding ? makes them lazy (.*?), matching as little as possible. Against <a><b>, the pattern <.*> grabs the whole string while <.*?> stops at <a>.
Do these work in every language?
The core table is universal (JavaScript, Python, Java, Go, PCRE). Notable differences: lookbehind support varies in older engines, Python spells named groups (?P<name>), and Go's RE2 has no backreferences or lookarounds.
Where can I try these live?
Our regex tester runs patterns against your own text as you type, with match highlighting.
Last updated: 2026-07-13