Regex Cheat Sheet

Searchable regex cheat sheet with anchors, quantifiers, groups and lookarounds — free.

About

About the Regex Cheat Sheet

A searchable quick reference for common regular expression syntax — character classes, anchors, quantifiers, groups, lookarounds and flags.

Developers use it as a quick memory-jog for a lookahead or group syntax they don't write every day, and students learning regular expressions use it to browse the building blocks in one place instead of digging through a long documentation page. It's one of many free developer tools on Toolapt, and like every tool here, it's free to use with no sign-up and no limit on how many times you run it.

Choose what to view about this tool

Guide

Using the Regex Cheat Sheet

  1. 1

    Step 1

    Type a keyword into the Search box — like "digit

  2. 2

    Step 2

    lookahead" or "group".

  3. 3

    Step 3

    Read the matching pattern and its meaning in the table below.

  4. 4

    Step 4

    Clear the search to browse the full reference from the top.

  5. 5

    Step 5

    Keep this page open alongside the Regex Tester to try out what you find.

  • Covers character classes, anchors, quantifiers, character sets, groups, lookarounds and flags
  • Searches both the pattern itself and its plain-English description
  • Updates the results live as you type, with no button to click
  • Shows a clear "no matches" message when a search finds nothing
  • Works entirely in your browser — nothing you type is sent to a server
  • Free to use, with no sign-up and no limit on how many times you run it
  • Fully responsive, so it works just as well on a phone as on a desktop

Developers

Developers use the Regex Cheat Sheet for a quick memory-jog on a lookahead, named group or quantifier syntax they don't write every day.

Students learning regex

Students learning regex use the Regex Cheat Sheet for browsing the building blocks of a pattern in one searchable place.

QA engineers

QA engineers use the Regex Cheat Sheet for double-checking the exact meaning of a pattern in a test assertion before changing it.

Technical writers

Technical writers use the Regex Cheat Sheet for confirming the correct name and syntax of a regex feature before documenting it.

Examples

Regex Cheat Sheet examples

3 worked examples

01

Looking up digits

Type "digit" into Search to instantly find \d (any digit) and \D (any non-digit) along with their plain-English descriptions.

02

Finding lookahead syntax

Type "lookahead" to see the pattern (?=...) for a positive lookahead and (?!...) for a negative lookahead.

03

No matches

Type a word that isn't in the reference, like "xyzzy", and the table shows a clear "no matches" message instead of an empty screen.

FAQ

Frequently asked questions

Quick answers to common questions about the Regex Cheat Sheet.

What does the Regex Cheat Sheet do?

It's a searchable reference table listing common regular expression syntax and what each piece means.

Is the Regex Cheat Sheet free to use?

Yes. It's free, with no sign-up, no watermark and no limit on how many times you use it.

Is my search safe when I use this tool?

Yes. The search runs entirely in your own browser against a built-in list — nothing is sent to a server.

What kind of syntax does it cover?

Character classes (\d, \w, \s and their negations), anchors (^ , $ , \b), quantifiers (* + ? {n,m}), character sets ([abc], [^abc], [a-z]), groups (capturing, non-capturing, named), backreferences, alternation, lookaheads and lookbehinds, and the common flags (g, i, m, s, u).

Does this reference match a specific regex flavor?

It reflects JavaScript's regular expression syntax, which is very close to what most other languages support for these common constructs, though some advanced features can differ between languages.

Can I search by what something does, not just its symbol?

Yes. Searching a word like "lookahead" or "digit" matches against the description as well as the pattern itself.

Is there a tool to actually test a pattern, not just look it up?

Yes — pair this cheat sheet with the Regex Tester, which runs a pattern against sample text and shows every match and capture group.

Can I use the Regex Cheat Sheet on my phone?

Yes. The page is fully responsive and works on mobile, tablet and desktop browsers alike.

Still have a question? Contact us

Report a problem

Regex Cheat Sheet

What went wrong?
    or paste a screenshot