Back to Tools

Regex Interactive Cheat Sheet

High-performance regular expression reference guide for elite developers

PRO REFERENCE

Character Classes

. Any character (except \n)
\d Any digit (0-9)
\w Word char (a-z, 0-9, _)
\s Whitespace char
[a-z] Range (a to z)

Quantifiers

* 0 or more times
+ 1 or more times
? 0 or 1 (Optional)
{n} Exactly n times
{n,m} Between n and m

Anchors & Logic

^ Start of line
$ End of line
\b Word boundary
| OR (Alternation)
(?:...) Non-capturing group

Lookarounds

(?=...) Positive Lookahead
(?!...) Negative Lookahead
(?<=...) Positive Lookbehind
(? Negative Lookbehind

Pro Tip: Click to Copy

Click any regex token in the list above to instantly copy it to your clipboard for use in our advanced tester.

Support Chat
We typically reply within minutes

Hello! πŸ‘‹ Before we start, please tell us your name.