string s = "abcdabcdabcdabcd"; MatchCollection mc = Regex.Matches(s, "abc"); Console.WriteLine(mc.Count);