Skip to content
← Back

Regex Cheatsheet - Online Tool

Code
Runs locally · Not uploaded

Handy Regex Cheatsheet for developers: covers metacharacters, quantifiers, groups, lookarounds, and common patterns. Searchable and categorized for quick reference. All local processing.

Was this result helpful?

For local tools, open DevTools → Network and search your input — it should not appear in requests.

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.

  1. Browse by category: character classes, quantifiers, anchors, groups, lookarounds, flags — jump to the bucket you are stuck on.
  2. Read the three columns: command → meaning → example. Examples are minimal runnable snippets you can paste into the Regex Tester.
  3. 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

Neither. The page opens ready to search and browse — there is no account system and no paywall.

Metacharacters, quantifiers, anchors, groups, lookaround (zero-width assertions), and common patterns such as email, URL, and phone, each with a short worked example.

Two ways: search by keyword — type a symbol or feature name to filter the entries — or browse category by category.

Not guaranteed. JS, Python, and Go differ in syntax details, so treat the sheet as a drafting aid and verify the pattern in a regex tester with real samples on your target runtime.

Three repeat offenders: greedy vs lazy matching, how ^ and $ change meaning in multiline mode, and forgotten escapes for metacharacters.

Find the symbol here, adapt the example into your pattern, paste real-world samples into the tester, and only then put it into code.

Related Tools

Related Articles