Arianule Arianule - 1 month ago 6
Javascript Question

Matching uppercase or lowercase string Regex

I need to match the last part an an email and am using Regex.

It is working fine using the following

"[a-zA-Z0-9._-]+@abc.com$"
but I want the last part of the address to be upper or lower case.

so that that it will match variations such as

john@abc.co.com
john@ABC.CO.com
john@Abc.co.com


as possible scenarios...so in other words all variations of upper and lower case.

How could I change the pattern to accommodate this

Answer