((an)|(in)|(on)) : Regular Expression : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Regular Expression »

 

((an)|(in)|(on))








    
 
using System;
using System.Text.RegularExpressions;

public class MainClass {
    public static void Main() {

        Regex p = new Regex("((an)|(in)|(on))");
        MatchCollection mn = p.Matches("King, Kong Kang");
        for (int i = 0; i < mn.Count; i++) {
            Console.WriteLine("Found '{0}' at position {1}",mn[i].Value, mn[i].Index);
        }

    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Regular Expression