Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WAD The @EMAIL Return Values Are Not 0 or 1

Jun
1,092
48
I know I reported this before. It may be that the output cannot be changed, but then it is important that the help file be updated. Right now, testing for a value of 1 to indicate a valid email address fails.
 
The function returns a value of 6 for my email address. Actually, it does for your case as well.

->echo %@email[[email protected]]
6
->iff %@email[[email protected]] == 1 then & echo valid & else & echo invalid & endiff
invalid

Vince, I don't understand how you can be getting a different value. Oh, maybe we are using different versions of regular expression parsing. I'm using Ruby.
 
Are you sure you're using the default @EMAIL, and not a plugin or UDF replacement? The one in TCC only returns 0 or 1.

Ughh. That's it. I had written a replacement function at the time that the built-in function did not recognize email addresses with uppercase characters. I copies what you said you used and added acceptance of A-Z as well as a-z. I don't know why that function now returns 6 instead of 1. I'll get rid of it and use the internal one.

Thanks for the explanation.
 
Back
Top