Hi,
I'm trying to do a regex to match email accounts from a specific domain.
So say, I'm trying to match all people that use my registration form using a Hotmail account.
This is the regex expression I have right now. Doesn't seem to match any hotmail accounts as valid though.
var emailFilter = new RegExp("^\w+@hotmail\.com$");
I've also tried
var emailFilter=/^\w+@/hotmail/\./com$//;
But this doesn't even initiate my javascript alert!
Anyone have any tips or could point out where I've gone wrong?
Thanks.
Maldini
I'm trying to do a regex to match email accounts from a specific domain.
So say, I'm trying to match all people that use my registration form using a Hotmail account.
This is the regex expression I have right now. Doesn't seem to match any hotmail accounts as valid though.
var emailFilter = new RegExp("^\w+@hotmail\.com$");
I've also tried
var emailFilter=/^\w+@/hotmail/\./com$//;
But this doesn't even initiate my javascript alert!
Anyone have any tips or could point out where I've gone wrong?
Thanks.
Maldini