fork download
using System;

namespace Programs
{
    public class Program
    {      
        public static void Main(string[] args)
        {
            string str = @"stackoverflow(stack:stackoverflow)overstackflow(over:stackoverflow)";
            Console.WriteLine(ExtractString(str));
        }

        static string ExtractString(string s)
        {
            // You should check for errors in real-world code, omitted for brevity
            var startTag = "(";
            int startIndex = s.IndexOf(startTag) + startTag.Length;
            int endIndex = s.IndexOf(":", startIndex);
            return s.Substring(startIndex, endIndex - startIndex);
        }
    }
}
Success #stdin #stdout 0.05s 33888KB
stdin
Standard input is empty
stdout
stack