Click here to Skip to main content
16,021,172 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
i want to check that user entered the yahoo(particular domain) email address how can i do that in c# windows app.
i m using this pattern
mRegexpp = new Regex(@"^([a-zA-Z0-9_\-])([a-zA-Z0-9_\-\.]*)@(\[((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}|((([a-zA-Z0-9\-]+)\.)+))([a-zA-Z]{2,}|(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\])$");
i also want that it verify that user entered a yahoo email address.
Posted

1 solution

 
Share this answer
 
Comments
Nainaaa 26-Jul-14 17:21pm    
mRegexpp = new Regex(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(?!yahoo)(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$");
now am using this regex,it is excluding yahoo addresses,i want that it accept the yahoo addresses and rejected the other ones.how can i do that??
Sergey Alexandrovich Kryukov 26-Jul-14 22:26pm    
5ed.
—SA
Abhinav S 27-Jul-14 2:42am    
Thank you SA.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900