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.