Next Match : Regex Match : Regular Expression C# Examples


C# Examples » Regular Expression » Regex Match »

 

Next Match









    
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(@"^\G\d+$\n?",  RegexOptions.Multiline);
                Match  m  =  r.Match("13\n38\n18\n5");
                do  {
                        Console.WriteLine("Match:  "  +  m.Value);
                }  while  ((m  =  m.NextMatch()).Success);
      }
}
    
   
  
   



Output

Match: 13

Match: 38

Match: 18

Match: 5


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Regular Expression
» Regex Match