We want to use regular expression for email validation in mvc . I have already used \"^[a-zA-Z0-9-.]+@[a-zA-Z0-9-.]+$\" but it is not working with \"_\" characters . How we will do this Please help me.
If you are using pattern "^[a-zA-Z0-9-.]+@[a-zA-Z0-9-.]+$" please
replace your pattern "^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
it will work properly.