using System; using System.Text.RegularExpressions;
public class MainClass { public static void Main() {
Regex q = new Regex(" in ");
MatchCollection mm = q.Matches("IN at in or"); for (int i = 0; i < mm.Count; i++) {
Console.WriteLine("Found '{0}' at position {1}",mm[i].Value, mm[i].Index);
}
}
}