using System.Text.RegularExpressions;
public static void Main()
if(isValidFirstName("Kisfaa"))
Console.WriteLine("VALID");
Console.WriteLine("NOT VALID");
public static bool isValidFirstName(string emailid)
Regex regex = new Regex(@"^([A-Z][a-z]{2,12})$");
Match match = regex.Match(emailid);
public static bool verifyEmailValid(string emailid)
Regex regex = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,11})+)$");
Match match = regex.Match(emailid);