Quick start
-
Browse entries
From ., \d, ^$ to lookaheads and word boundaries.
-
Search
Filter by pattern, description, or example.
-
Copy and test
Copy into the Regex Tester to validate.
Covers the most-used JavaScript/PCRE metacharacters, quantifiers, groups, and flags (i/g/m). Pair with our Regex Tester to look up syntax and validate matches live.
Privacy: processed locally, never uploaded.
↓ Paste in the input area below to see results instantly
Regex syntax and common pattern cheat sheet; pair with the Regex Tester for live validation.
.Any character except newline
a.b matches acb
\dDigit [0-9]
\d+ matches 123
\wWord character [A-Za-z0-9_]
\w+
\sWhitespace
\s+
^Start of string/line
^Hello
$End of string/line
world$
*Zero or more (greedy)
ab*c
+One or more
\d+
?Zero or one
colou?r
{n,m}Between n and m times
\d{2,4}
[]Character class
[A-Za-z]+
[^]Negated class
[^0-9]+
|Alternation
cat|dog
()Capturing group
(\d{4})-(\d{2})
(?:)Non-capturing group
(?:https?)://
(?=)Positive lookahead
(?=\d{3})
(?!)Negative lookahead
(?!bad)
\bWord boundary
\bword\b
i flagCase insensitive
/hello/i
g flagGlobal (all matches)
/\d/g
m flagMultiline ^ $
/^line/m
Covers common JavaScript/PCRE metacharacters and flags; engine behavior may vary slightly.
Covers the most-used JavaScript/PCRE metacharacters, quantifiers, groups, and flags (i/g/m). Pair with our Regex Tester to look up syntax and validate matches live.
Browse entries
From ., \d, ^$ to lookaheads and word boundaries.
Search
Filter by pattern, description, or example.
Copy and test
Copy into the Regex Tester to validate.
JavaScript, Python, and Go regex differ slightly; this sheet focuses on JS RegExp—verify when porting.
^ and $ match the start and end of a string respectively. For example, ^\d+$ ensures the entire string consists of digits. \b matches word boundaries - \bword\b won't match 'keyword'. Escape special characters with backslashes, like \. for literal dots.
Quantifiers control repetition: ? for 0 or 1, + for 1 or more, * for any count, {n,m} for ranges. Greedy matching (default) captures longest possible text. Add ? for lazy mode, like a.*?b to match shortest a...b segment.
Input
\d+
Output
One or more digits
Memo is a static syntax sheet; the tester runs live matches on your strings.
No.
Build regex incrementally: test basic parts first, then add conditions progressively. Use our regex tester to visualize matches in real-time - browser console shows syntax errors. For long texts, test with samples first.