Email validation
Vino
vino.bheeman at hotmail.com
Wed Nov 29 07:02:31 UTC 2017
On Wednesday, 29 November 2017 at 05:22:34 UTC, Dmitry wrote:
> 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.
Hi All,
Thank you, the above code worked.
From,
Vino.B
More information about the Digitalmars-d-learn
mailing list