Sample

Email Address Validator

Validates that a string follows a standard email format: local part, @ symbol, domain, and TLD.

3/7

matches

Pattern

/^[\w.-]+@[\w.-]+\.\w{2,}$/i

Test String

1user@example.com
2john.doe@company.co.uk
3invalid-email
4@missing-local.com
5name@.com
6test@domain.io
7hello@world

Explanation

^ — Start of string

[\w.-]+ — One or more word chars, dots, or hyphens (local part)

@ — Literal @ symbol

[\w.-]+ — Domain name

\. — Literal dot before TLD

\w{2,} — TLD with 2+ characters

$ — End of string

Notes

This is a basic email regex. For production use, consider RFC 5322 compliance or use a dedicated email validation library.

powered bySimplySimplyOnlinenline