Last active
April 25, 2022 12:23
-
-
Save martinusso/39f52e3442dc2e35e4b698167c695caa to your computer and use it in GitHub Desktop.
Delphi Email Address Validator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// uses RegularExpressions; | |
function ValidateEmail(const emailAddress: string): Boolean; | |
var | |
RegEx: TRegEx; | |
begin | |
RegEx := TRegex.Create('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]*[a-zA-Z0-9]+$'); | |
Result := RegEx.Match(emailAddress).Success; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
unicode symbols after @?)