using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
var m = Regex.Match("apple", "(?<C>a(?=pple)|b(?=anana)|c(?=herry))");
if (m.Success)
{
Console.WriteLine("fruit\'s initial: {0}", m.Groups["C"].Value);
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKdXNpbmcgU3lzdGVtLklPOwp1c2luZyBTeXN0ZW0uTGlucTsKdXNpbmcgU3lzdGVtLlRleHQuUmVndWxhckV4cHJlc3Npb25zOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCXZhciBtID0gUmVnZXguTWF0Y2goImFwcGxlIiwgIig/PEM+YSg/PXBwbGUpfGIoPz1hbmFuYSl8Yyg/PWhlcnJ5KSkiKTsKCQlpZiAobS5TdWNjZXNzKQoJCXsKCQkgICAgQ29uc29sZS5Xcml0ZUxpbmUoImZydWl0XCdzIGluaXRpYWw6IHswfSIsIG0uR3JvdXBzWyJDIl0uVmFsdWUpOwoJCX0KCX0KfQ==