Skip to main content
ConvertLab
Tools

Developer & Data

Regex Cheatsheet & Tester

Common regex patterns with a syntax reference — test them against your text.

  • Runs in your browser

Test string

Reference & matches

Email

/[\w.-]+@[\w.-]+\.\w{2,}/g

Matches most common email formats

0 matches

Regex syntax reference

.Any character (except newline)
\dDigit (0-9)
\wWord character (a-z, A-Z, 0-9, _)
\sWhitespace (space, tab, newline)
^Start of string/line
$End of string/line
*Zero or more
+One or more
?Zero or one (optional)
{n}Exactly n times
{n,m}Between n and m times
[abc]Character class (a or b or c)
[^abc]Negated class (not a, b, or c)
(abc)Capture group
(?:abc)Non-capturing group
a|bAlternation (a or b)
\bWord boundary
\1Backreference to group 1

Was this tool useful?

Stored locally in your browser only — not sent anywhere.

Tools you may need