What I want to do is to validate an email address with exact gmail or yahoo word and I have tried the following but failed:
/^[a-z0-9._%+-]+@[^gmail$.-]+\.[a-z]{2,}$/
suppose if anyone mistakenly tried to sign up using example@gmal.com or example@mail.com or example@yaho.com or something like that. How can I validate that??