Hi Greg,
You have a name conflict in your code. On line 3 of SOemailverification you define a variable EMAILADDRESS but I your code, I think, wants to access the form variable EMAILADDRESS (defined in the form properties).
I think you just need to delete line 3 of SOemailverification.
Also with a RegExp you can specifiy they are case insensitive, so you could use RegExp("^[A-Z0-9_\\-\\.]+\\@testdomain.com", "i"), that is with the "i" option in argument two, so you may not need the four RegExp?
Regards
Bruce