Email validation

Dmitry dmitry at indiedev.ru
Wed Nov 29 05:22:34 UTC 2017


On Wednesday, 29 November 2017 at 03:49:56 UTC, codephantom wrote:
>     string domainRequired = "@hotmail.com";
>
>     string emailAddress = "vino.bheeman at hotmail.com";
>
>     emailAddress.endsWith(domainRequired) ? writeln("domain ok")
>          : writeln("invalid domain");
Also you need check that only one @ used.


More information about the Digitalmars-d-learn mailing list