Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can anyone help me in how to validate a email address....?. below is the screenshot of the question
Thanks,
Robert
if (purgechar(purgechar(Upper(Email),'ABCDEFGHIJKLMNOPQRSTUVXY.-_@')=Upper(Email),'Valid','Not valid') as Email.status
Not Purgechar. I meant keepchar...
if (keepchar(Upper(Email),'ABCDEFGHIJKLMNOPQRSTUVWXYZ.-_@')=Upper(Email),'Valid','Not valid') as Email.status
thanks Robert
Now its working fine... Can you explain me this ('ABCDEFGHIJKLMNOPQRSTUVWXYZ.-_@') section...
That is a list of the characters you want to keep from the email adress when comparing to the original content.
Keepchar examples:
keepchar('bonjour','jour') = 'bon'
keepchar('Abcd123','123') = '123'
purgechar is the opposite, it define which characters should be removed :
purgechar('bonjour','jour') = 'jour'
purgechar('Abcd123','123') = 'Abcd'
Have a look in the help files. They have often good examples. As a beginner though it is dificult to know "what" to search for. But if you search for "string functions" in the help, you will find a lot of useful functions.
Robert
Thank You Robert again, but i just want to know why you are using hyphen and underscore(-_) in the substring..
Oh, ok. Yes I added those because they are valid email characters and might exist, so they are needed for the comparison, in a general pupose. Perhaps they are not valid in your organization, if this is the case, just remove them.
ok, Got it
Thanks Robert
Thanks,
Robert