Can you try this way (simple, byt it works)
<!-- start spliting -->
<!-- end spliting -->
after executing the two split commands you can expect that 'b' is array
b is the account name in exmpl. contains 'some'
b is array with servers part in example contains b-'somewhere'; b - 'com'
after extracting the email parts you can made every validation you want.