← All Exercises
Email Regex Validator
intermediatejavascript
Background
Email validation is one of the most common regex use cases in form processing and user input validation.
Problem
Write a function that takes a string and returns whether it matches a valid email address format using a regular expression.
Input
A string to validate as an email address.
Output
A boolean indicating whether the string matches email format.
Sample tests
Your solution
Learning objective
Practice regex pattern construction and understand email format validation trade-offs.