Hi everyone,
I see your regular expression knowledge is really low. Am sure that you copied it from someone else :) Not to worry, you can learn regular expressions really fast.
First things first, you don't normally validate for capitals in e-mail. Instead, what you do is, when you save it into your database, you case it to lowercase using
string.ToLower()[
^] method.
But in case, you really want to validate that with that expression of yours, all you have to do is remove A-Z from your expression. It would look like;
string pattern = "^[^@]+@([-\\w]+\\.)+[a-z]{2,4}$"
If you like to read about regular expressions more, I found these links to be really helpful. They explain things very clearly, makes it easy to understand.
Regular Expressions - User Guide[
^]
jQuery RegEx Examples to use with .match()[
^]
Regular Expression Basic Syntax Reference[
^]
Hope this helps, regards :)