fork download
using System;
using System.Text.RegularExpressions;

public class Test
{
	public static void Main()
	{
		string stroka = "На путях я вижу сорок резво скачущих сорок.";
		string needle = "сорок";
		Regex ragularka = new Regex(needle + @"(\w*)");
		MatchCollection matches = ragularka.Matches(stroka);
		foreach (Match match in matches)
                {
                    Console.WriteLine(match.Value);
                }
	}
}
Success #stdin #stdout 0.06s 21164KB
stdin
Standard input is empty
stdout
сорок
сорок