The Devs Tools

Regex Cheatsheet

Search and filter through regular expression syntax tokens, modifiers, qualifiers, and capture assertions.

Matches any single character except newlineCharacter Classes
Example: a.c matches abc, a2c
.
Matches any digit (equivalent to [0-9])Character Classes
Example: \d matches 5, 8
\d
Matches any non-digit (equivalent to [^0-9])Character Classes
Example: \D matches a, !
\D
Matches word character (alphanumeric + underscore)Character Classes
Example: \w matches x, 3, _
\w
Matches any non-word characterCharacter Classes
Example: \W matches %, space, -
\W
Matches any whitespace character (space, tab, newline)Character Classes
Example: \s matches tab, space
\s
Matches any non-whitespace characterCharacter Classes
Example: \S matches x, 4, #
\S
Asserts position at the start of the stringAnchors
Example: ^abc matches only starting with abc
^
Asserts position at the end of the stringAnchors
Example: abc$ matches ending with abc
$
Asserts a word boundary positionAnchors
Example: \bcat\b matches cat but not catalog
\b
Matches 0 or more occurrences of preceding tokenQuantifiers
Example: a* matches '', a, aaa
*
Matches 1 or more occurrences of preceding tokenQuantifiers
Example: a+ matches a, aaa
+
Matches 0 or 1 occurrence of preceding token (optional)Quantifiers
Example: colou?r matches color, colour
?
Matches exactly n occurrences of preceding tokenQuantifiers
Example: a{3} matches aaa
{n}
Matches n or more occurrences of preceding tokenQuantifiers
Example: a{2,} matches aa, aaa, aaaa
{n,}
Matches between n and m occurrences of preceding tokenQuantifiers
Example: a{2,4} matches aa, aaa, aaaa
{n,m}
Capturing group for sub-expressions and extractionGroups
Example: (abc) matches abc and creates group
(...)
Non-capturing group (matches but doesn't extract)Groups
Example: (?:abc) matches abc without group index
(?:...)
Positive lookahead assertionLookarounds
Example: a(?=b) matches a only if followed by b
(?=...)
Negative lookahead assertionLookarounds
Example: a(?!b) matches a only if not followed by b
(?!...)

Frequently Asked Questions

Is my data sent to a server when using the Regex Cheatsheet?
No. The Regex Cheatsheet is a fully client-side utility. All data processing, calculations, and conversions are handled locally in your browser. No input text, payloads, or keys are uploaded to any external server.
What regular expression flags are supported?
It supports standard JS regex flags including `g` (global), `i` (case-insensitive), `m` (multi-line), `u` (unicode), and `s` (dotAll).
How are capturing groups highlighted?
The tester evaluates matches dynamically, showing capturing groups and indices side-by-side for clear expression debugging.
Which regex flavor is implemented?
The regular expression parsing conforms to standard ECMAScript / JavaScript regular expression engines built directly into your browser.
Does the Regex Cheatsheet store history or cache my inputs?
No. The application runs entirely in browser memory. Once you refresh the tab, navigate away, or close the window, all inputted details, logs, and outputs are completely cleared.
Is the Regex Cheatsheet compatible with mobile devices?
Yes. The interface is optimized to be fully responsive. You can perform calculations, conversions, and formats on all modern mobile, tablet, and desktop web browsers.
Does the Regex Cheatsheet work offline?
Yes. Once loaded, all code and assets required to run the Regex Cheatsheet reside in your browser cache, enabling offline use without an active network connection.