using System;
using System.Text.RegularExpressions;
publicclass MainClass {
publicstaticvoid 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);
}
}
}