using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
string text = "![][][]";
var charSetOccurences = new Regex(@"!\[(.*?)*\]");
var charSetMatches = charSetOccurences.Matches(text);
foreach (Match match in charSetMatches)
{
Console.WriteLine(match.Groups[1].Value);
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CnB1YmxpYyBjbGFzcyBUZXN0CnsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKICAgIHsgICAKICAgICAgICBzdHJpbmcgdGV4dCA9ICIhW11bXVtdIjsKICAgICAgICB2YXIgY2hhclNldE9jY3VyZW5jZXMgPSBuZXcgUmVnZXgoQCIhXFsoLio/KSpcXSIpOwogICAgICAgIHZhciBjaGFyU2V0TWF0Y2hlcyA9IGNoYXJTZXRPY2N1cmVuY2VzLk1hdGNoZXModGV4dCk7CiAgICAgICAgZm9yZWFjaCAoTWF0Y2ggbWF0Y2ggaW4gY2hhclNldE1hdGNoZXMpCiAgICAgICAgewogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZShtYXRjaC5Hcm91cHNbMV0uVmFsdWUpOwogICAgICAgIH0KICAgIH0KfQ==