email validate

PHOTO EMBED

Sun Jan 14 2024 11:31:24 GMT+0000 (Coordinated Universal Time)

Saved by @MinaTimo

Static Server boolean validateEMail(EMail    _eMail)
{
    Boolean   xppBool;
    System.Boolean netBool;
    Str MatchEmailPattern =
       @"^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@"
     + @"((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?
       [0-9]{1,2}|25[0-5]|2[0-4][0-9])\."
     + @"([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?
       [0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"     
     + @"([\w-]+\.)+[a-zA-Z]{2,4})$";
    System.Text.RegularExpressions.Match myMatch;
    ;

    new InteropPermission(InteropKind::ClrInterop).assert();
    myMatch = System.Text.RegularExpressions.Regex::Match(_eMail,MatchEmailPattern);
    netBool = myMatch.get_Success();
    xppBool = netBool;
    CodeAccessPermission::revertAssert();
    Return xppBool;
} 
content_copyCOPY