Regex lab
browserLive matches, capture groups and a replace preview you can trust.
Loading tool…
Live matches, capture groups and a replace preview you can trust.
Loading tool…
/^(?:[a-z]+@[a-z]+\.[a-z]+|[a-z]+\+[a-z]+@[a-z]+\.[a-z]+\.[a-z]+)$/gm
Every positive matches and no negative does — verified against these examples.
\d — any digit 0-9[a-z] — any lowercase letter[A-Z] — any uppercase letter\s — space or tabliteral — that exact character, escapedA guard is a look-ahead that rejects any string containing that exact substring. It is the shortest one that separates the negatives from the positives.
Contact genor@samurai.dev or support+team@mail.example.org.
Bad: @nope, nope@noNothing replaced.