Reputation: 3747
[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
If I replace all instances of "a-z" with "a-zA-Z", will that make this case insensitive?
JavaScript and .net both have options you can specify for case insensitivity but they are different, and I'm using this is an asp.net validator so it has to use the same expression for both server and client side validation, meaning that if I use the ?: switch or the /i switch either the client or the server side validation will fail.
Upvotes: 1
Views: 74
Reputation: 784938
Why not just add:
A-Za-z
inside the character class, everywhere you're using it in this regex.
Upvotes: 2