Regex for email address validation in JavaScript
Validating email addresses is the canonical regex task. This pattern matches a local part, an @, and a dotted domain — pragmatic, not RFC-perfect. Test it live below.
/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/Try it live
The pattern and sample strings below are pre-loaded. Edit anything, or describe a variation in plain English and generate your own.
/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/valid ✓Tested live on the JavaScript engine. Other flavors are validated and flagged for differences, not executed.
No samples.