Handy Regex Cheatsheet for developers: covers metacharacters, quantifiers, groups, lookarounds, and common patterns. Searchable and categorized for quick reference. All local processing.
TL;DR: Free online regex cheat sheet covering metacharacters, quantifiers, groups, lookahead assertions, and common patterns, with examples and explanations. Keyword search and category browsing. Runs locally.
This tool runs entirely in your browser. Open DevTools → Network panel and search your input — it appears in no request.
Next steps
Usage Guide
Regex syntax lives scattered across language docs, and the painful moment is always "what does this symbol mean again?". This page packs common metacharacters, quantifiers, anchors, groups, and lookarounds into a searchable cheat sheet with short examples — for glancing while you write, not re-reading a tutorial.
1. How to use the sheet
A cheat sheet is a symbol dictionary, not a debugger. When matches fail, walk the "regex not matching" diagnostic table top-down: greed, flags, escapes, newlines, Unicode.
- Browse by category: character classes, quantifiers, anchors, groups, lookarounds, flags — jump to the bucket you are stuck on.
- Read the three columns: command → meaning → example. Examples are minimal runnable snippets you can paste into the Regex Tester.
- To understand a whole inherited pattern, open the Regex Explainer; to see whether it matches, open the Regex Tester.
2. Pairs people mix up most
- . vs \. : the dot matches any character (usually except newline); a literal dot must be escaped.
- * / + / ? vs their lazy forms with ?: greedy by default; add ? to match as little as possible.
- ^ / $ change with /m: without it they anchor the whole string; with /m they anchor each line.
- (...) vs (?:...): capturing vs non-capturing — that decides what match[1] holds.
- \w is ASCII-leaning by default: for Chinese/emoji use /u and Unicode properties like \p{L}.
3. How the regex tools split work
Engine caveat: JavaScript, Python, Java, and Go differ on lookbehind, named groups, and recursion. This sheet focuses on shared syntax — re-test in the target language before shipping.
- Cheat sheet: look up syntax you forgot.
- Explainer: unpack an entire pattern into plain language.
- Tester: highlight matches and capture groups on real samples.
- Text extractor: pattern is already correct and you need every match in bulk.
FAQ
Completely free with no registration. Content loads locally for instant lookup.
Metacharacters, quantifiers, groups, lookahead assertions, and common patterns (email, URL, phone), each with examples.
Yes. Keyword search and category browsing let you quickly locate a symbol or feature by name.
Related Tools
Related Articles
Regex Not Matching? Troubleshoot These 6 Common Pitfalls
How to troubleshoot when a regex doesn't match or matching fails? This article walks through 6 common pitfalls — greedy quantifiers, missing flags, unescaped special chars, lookaround assertions, newline handling, and Unicode properties — with before/after examples to help you quickly locate regex debugging issues.
Regex Matches Nothing / Greedy .* Swallows Results — How to Fix
Online regex test matches nothing, or greedy .* eats too much, or groups capture nothing? Explains greedy vs lazy, escaping special chars, and anchors — with a step-by-step debug using our regex tester.
Online Regex Explainer: Visualize and Understand Regular Expressions
Learn how to parse and understand regular expressions. Understand regex syntax structure, matching principles, and how to use visualization tools to analyze complex patterns.