Regex for Email : Regex Email : Regular Expression C# Examples


C# Examples » Regular Expression » Regex Email »

 

Regex for Email









    
using  System;
using  System.Collections.Generic;
using  System.Globalization;
using  System.Text;
using  System.Text.RegularExpressions;
using  System.Reflection;

public  class  MainClass{

      public  static  void  Main(){
                Regex  r  =  new  Regex(@"\w+@(\w+\.)+\w+");
                Console.WriteLine(r.IsMatch("j@by.com"));
                Console.WriteLine(r.IsMatch("jn@b.com"));
                Console.WriteLine(r.IsMatch("o47@l.com"));
      }
}
    
   
  
   



Output

True
True
True


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Regular Expression
» Regex Email