Look up every regular-expression token — character classes, anchors, quantifiers, groups, lookaround, flags and escapes — in one searchable table, each with its name, a plain-English meaning and a short example. In your browser, free.

Every regular-expression token, explained with an example. Everything runs in your browser from a built-in reference — nothing is sent to the server.

Token Name Description Example
No token matches your search.
Try a different token or term — for example \b, lookahead or quantifier.

About Regex Token Reference

The Regex Token Reference collects every regular-expression building block in one searchable table: character classes like \d and \w, anchors like ^ and \b, quantifiers like * and {2,4}, groups and backreferences, lookahead and lookbehind, flags such as i, g and m, and the escapes for special characters. Each token comes with its name, a plain-English meaning and a short example.

It is built for the moment you half-remember a token: you know a lookahead exists but not whether it is (?=…) or (?<=…), or you cannot recall if \b is a word boundary or a backspace. Search accepts the token itself, its name or a word from its meaning, so any of those clues finds the row.

The seven category filters — character classes, anchors, quantifiers, groups and references, lookaround, flags and modifiers, escapes and special — also make the table a compact study guide for reading other people’s patterns. Every token is copyable with one click, and the whole reference runs in your browser.

How to use Regex Token Reference

  1. Type a token (\d), a name (word boundary) or a meaning keyword (lookahead) into the search box.
  2. Or narrow the table by category: character classes, anchors, quantifiers, groups, lookaround, flags or escapes.
  3. Read the token’s plain-English description and its short usage example.
  4. Click the copy button to grab the exact token for your pattern.

Frequently asked questions

Both assert what surrounds the current position without consuming it. A lookahead (?=…) checks the text that follows; a lookbehind (?<=…) checks the text that precedes. Their negative forms, (?!…) and (?<!…), require the pattern to be absent instead.

A word boundary — the zero-width position between a word character (letters, digits, underscore) and a non-word character or the string edge. It matches a position, not a character, which is why \bcat\b finds “cat” but not “concatenate”.

When the character has special meaning — . * + ? ( ) [ ] { } | ^ $ and the backslash itself. Prefix it with a backslash to match it literally; the escapes category lists each one with an example.

The tokens listed are the common core shared by mainstream engines (JavaScript, PCRE and friends). A few advanced features, such as lookbehind, arrived later in some engines, so check your language’s documentation for edge cases.

This page is a lookup reference for individual tokens. To assemble and try full patterns against sample text, pair it with a regex tester — the reference tells you what each piece means while you build.

Yes, completely free. The table ships with the page, and searching, filtering and copying all run in your browser without any server requests.

Need help?
Found an issue with this tool? Let our team know.
Report an issue

Add this free tool to your own website — copy and paste the code below.