Hi man,
Can you try this way (simple, byt it works)
var email_account="some@somewhere.com";
<!-- start spliting -->
var b=email_account.split('@');
b[1]=b[1].split('.');
<!-- end spliting -->
document.write(b[0]+'<br>'+b[1][0]+'<br>'+b[1][1]);
after executing the two split commands you can expect that 'b' is array
with:
b[0] is the account name in exmpl. contains 'some'
b[1] is array with servers part in example contains b[1][0]-'somewhere'; b[1][1] - 'com'
after extracting the email parts you can made every validation you want.