Use Regex to validate your input : Regex Match : Regular Expression C# Examples


C# Examples » Regular Expression » Regex Match »

 

Use Regex to validate your input









    
using  System;
using  System.Text.RegularExpressions;

class  MainClass
{
        public  static  void  Main(string[]  args)
        {

                string  regex  =  "your  regex";  
                string  input  =  "your  input";
                
                Regex  r  =  new  Regex(regex);
                Console.WriteLine(r.IsMatch(input));
                
                //or  Regex.IsMatch(input,  regex);
        }
}
    
   
  
   



Output

False


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Regular Expression
» Regex Match