What is the simplest regular expression for email validation?

Asked By:
1 answer(s)
[]

The search for a single, perfect email regex is a classic trap! For a simple yet highly practical check, this one is excellent: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$.

It's a good, sensible balance. You see, trying to validate every possible edge case with just regex is not recommended.