new Regex('^\\d+') 1 : Regular Expression : Regular Expression C# Examples


C# Examples » Regular Expression » Regular Expression »

 

new Regex('^\\d+') 1









    
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("^\\d+");
                
                
                string[]  ss  =  new  string[]  {  "123abc",  "abc123",  "123",  "abc",  "a123bc"  };

                foreach  (string  s  in  ss)
                      Console.WriteLine(r.IsMatch(s));
      }
}
    
   
  
   



Output

True
False
True
False
False


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Regular Expression
» Regular Expression