This is the function I use
Function ValidEmail
Lparameters lcMail
Local ox, llReturn
If Pcount()>0 And Vartype(lcMail)='C'
ox=Createobject('VBScript.RegExp')
ox.Pattern= '^[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]' + ;
'@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]' + ;
'\.[a-zA-Z]{2,4}$'
ox.IgnoreCase= .T.
ox.Global=.F.
llReturn=ox.Test(lcMail)
Release ox
ox=.Null.
Endif
Return llReturn
>Hello Sergey,
>Thank you for directed me to the site were they have a lot of scripts, howerver something is wrong going with me whatevert I input into the field I get invalid input and frankly I am lost with it here is the full script
>
>LPARAMETERS tcEmailAddr
>LOCAL loRegExp
>loRegExp = CreateObject("VBScript.RegExp")
>loRegExp.IgnoreCase = .T.
>loRegExp.Pattern = '^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$'
>RETURN loRegExp.Test("tcEmailAddr")
>
>Can you help with this