Regex Cheatsheet Lookup

Searchable reference for 100+ regex tokens with live examples, common pattern library, inline tester, and cross-flavor notes for JS, Python, PCRE, POSIX.

Share:
Home/Developer Tools/Regex Cheatsheet Lookup

Regex Cheatsheet Lookup

Searchable reference for 100+ regex tokens with live examples, common pattern library, inline tester, and cross-flavor notes for JavaScript, Python, PCRE, and POSIX.

68 tokens
14 common patterns
4 flavors

Character Classes
13

Any digit (0-9).
\d+Order #12345 on 2024
\dabc 7 xyz
Any non-digit character.
\D+123abc456
Any word character (a-z, A-Z, 0-9, _).
\w+hello_world!
Any non-word character.
\Whi!
Any whitespace (space, tab, newline).
a\sba b
Any non-whitespace character.
\S+ hello
Any character except newline (unless s flag is set).
h.that hot hit
Character set — matches any one of a, b, or c.
[aeiou]hello
Negated character set — any char except a, b, or c.
[^aeiou]+hello
Character range — any lowercase letter.
[a-z]+ABC xyz 123
Any uppercase letter.
[A-Z]+Hello World
Any digit (same as \d in ASCII mode).
[0-9]{3}tel 555 ok
Any alphanumeric character.
[a-zA-Z0-9]+_abc123_

Anchors & Boundaries
7

Start of string (or line with m flag).
^HelloHello world
End of string (or line with m flag).
world$Hello world
Word boundary.
\bcat\bthe cat sat
Non-word boundary.
\Bcatconcatenate
Start of input (PCRE/Python — not JS).
\AHelloHello world
End of input (PCRE/Python — not JS).
world\ZHello world
Absolute end of string (PCRE).
end\zthe end

Quantifiers
11

Zero or more (greedy).
ab*a abbb
One or more (greedy).
ab+a abbb
Zero or one (optional).
colou?rcolor
Exactly n times.
\d{4}year 2024
n or more times.
\d{2,}1 22 333
Between n and m times.
\d{2,4}12345
Lazy zero or more — matches as few as possible.
<.*?><b>hi</b>
Lazy one or more.
\d+?12345
Lazy optional.
ab??ab
Lazy bounded quantifier.
\d{2,4}?12345
Possessive quantifier (PCRE) — no backtracking.
a*+baaab

Groups & Lookarounds
10

Capturing group.
(\d+)-(\d+)2024-04
Non-capturing group.
(?:ab)+ababab
Named capturing group.
(?<year>\d{4})year 2024
Backreference to group 1.
(\w)\1letter
Named backreference.
(?<q>["']).*?\k<q>"hi"
Positive lookahead — followed by abc.
\d+(?=px)10px 20em
Negative lookahead — not followed by abc.
\d+(?!px)10em 20px
Positive lookbehind — preceded by abc.
(?<=\$)\d+price $99
Negative lookbehind — not preceded by abc.
(?<!\$)\d+100 $99
Atomic group (PCRE) — no backtracking.
(?>a+)baaab

Alternation
2

Alternation — matches left OR right.
cat|dogI have a dog
Grouped alternation.
(red|green|blue)sky is blue

Escapes & Special Characters
9

Literal dot.
\.comsite.com
Literal forward slash (needed in /.../ syntax).
\/api/api/v1
Literal backslash.
\\npath\name
Newline character.
a\nba b
Tab character.
\t+a b
Carriage return.
\r\nline
Null character.
\0
Hex character (2 digits).
\x41A
Unicode character (4 hex digits).
\u00e9café

Flags / Modifiers
7

Global — find all matches.
/a/gbanana
Case-insensitive.
/hello/iHELLO
Multiline — ^ and $ match line starts/ends.
/^foo/mbar foo
Dotall — . matches newlines.
/a.b/sa b
Unicode mode — enables \p{} and proper unicode handling.
/\p{L}/ucafé
Sticky — matches only at lastIndex (JS).
/foo/yfoofoo
Extended — ignore whitespace & allow comments (PCRE/Python).
/ \d+ /xnum 42

Unicode Properties
9

Any Unicode letter (requires u flag in JS).
\p{Letter}+café123
Short form for Letter.
\p{L}
Any Unicode numeric character.
\p{Number}+abc123
Short form for Number.
\p{N}
Uppercase letter.
\p{Lu}+Hello
Lowercase letter.
\p{Ll}+Hello
Punctuation character.
\p{Punct}hi!
Characters from a specific script.
\p{Script=Greek}+hi Αθήνα
Negated — any non-letter.
\P{L}+abc 123

Frequently Asked Questions

What is the Regex Cheatsheet Lookup?

The Regex Cheatsheet Lookup is a free online tool that searchable reference for 100+ regex tokens with live examples, common pattern library, inline tester, and cross-flavor notes for js, python, pcre, posix.. It runs entirely in your browser with no installation or sign-up needed.

Which regex flavors are covered?

JavaScript (ECMAScript), Python (re/regex), PCRE (PHP/Perl), and POSIX (BRE/ERE). The Flavors tab highlights differences: \A/\Z anchors, possessive quantifiers, POSIX classes.

Does the inline tester run locally?

Yes. Every match and highlight is computed in your browser via native JavaScript RegExp. Nothing is sent to a server.

Can I copy patterns directly?

Yes — click Copy next to any token or common pattern (Email, URL, IPv4, UUID, strong password, etc.) to put the raw pattern on your clipboard.

Is the Regex Cheatsheet Lookup free to use?

Yes, the Regex Cheatsheet Lookup is 100% free with no registration, no hidden fees, and no usage limits. All processing happens locally in your browser, ensuring complete privacy.

Is my data safe with this tool?

Absolutely. The Regex Cheatsheet Lookup processes everything client-side in your browser. No data is uploaded to or stored on any server. Your content remains private on your device at all times.

Does the Regex Cheatsheet Lookup work on mobile devices?

Yes, the Regex Cheatsheet Lookup is fully responsive and works on smartphones and tablets. You can use it on any device with a modern web browser -- no app download required.

Do I need to create an account to use this tool?

No account or registration is needed. Simply open the Regex Cheatsheet Lookup in your browser and start using it immediately. There are no sign-up walls or usage restrictions.

What programming languages or formats does this support?

The Regex Cheatsheet Lookup supports a wide range of popular formats and languages. Check the tool interface for the full list of supported options.

How do I use the Regex Cheatsheet Lookup?

Simply enter your input in the provided field, adjust any settings to your preference, and the tool will process it instantly. You can then copy the result to your clipboard or download it.

About Regex Cheatsheet Lookup

Regex Cheatsheet Lookup is a free, browser-based tool in our Developer Tools collection. Everything runs locally on your device — no uploads, no sign-up, and your data stays private.

regex cheatsheetregex referenceregex patternsregex libraryregex testerfree regex cheatsheet lookuponline regex cheatsheet lookupregex cheatsheet lookup online freebest regex cheatsheet lookupdeveloper toolweb development