Write a simple regex for email validation? (C# interview questions with answers)
Before reading the interview answer , please go through this regex video to understand fundamentals of regex with c#
Email validation can be divided in to three part the first is email user name , domain name and the domain extension.
Step 1(Email user name):- Email user name can start with alphanumeric with minimum 1 character and maximum 10 character. , followed by at the rate (@).
Step 2 ( Domain name) :-The domain name after the @ can be alphanumeric with minimum 1 character and maximum 10 character , followed by a "."
Step 3 ( Domain extension):-Finally should end with .com or .org
The final full email regex validation is below.
Please visit www.questpond.com for 600 c# interview questions and answers videos.