I want an regex for email that starts with numbers and letters.
My regex is
/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/
What is wrong in this? It allows ._-
from start and in between. But I don't want this
Valid emails = [email protected]
, [email protected]
, [email protected]
Invalid emails = [email protected]
, [email protected]
, [email protected]
, [email protected]
, [email protected]
Does anyone know how this can be done?