Regex Tester

Test JavaScript regular expressions with live match highlighting and plain-English explanations.

Click a tag to insert it at the cursor position

Test string

Highlighted matches

3
good@example.com
not-an-email
learner@coddy.tech
bad@domain
user.name+tag@sub.domain.io

Explanation

^Start of string (or line with m flag)
[\w.+-]+Character class — one of \w.+-, one or more times
@Literal “@”
[\w-]+Character class — one of \w-, one or more times
\.Escaped literal “.”
[\w.-]+Character class — one of \w.-, one or more times
$End of string (or line with m flag)

Reference

EngineJavaScript RegExp only — matches browser and Node behavior
Flagsg find all · i ignore case · m ^/$ per line · s . matches newline · u Unicode · y sticky
SlashesDo not wrap the pattern in /…/ — those are JS literal syntax, not part of the pattern
PrivacyEverything runs locally in your browser — nothing is uploaded