using System;
using System.Linq;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
var s = "#Abc=\"\"";
var result = Regex.Replace(s, "#[A-Za-z0-9]+(=\"\")", m=>
string.Format("{0}{1}{2}",
m.Value.Substring(0, m.Groups[1].Index),
new string('?', m.Groups[1].Length),
m.Value.Substring(m.Groups[1].Index+m.Groups[1].Length, m.Value.Length-m.Groups[1].Index-m.Groups[1].Length)));
Console.WriteLine(result);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uTGlucTsKdXNpbmcgU3lzdGVtLlRleHQuUmVndWxhckV4cHJlc3Npb25zOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCXZhciBzID0gIiNBYmM9XCJcIiI7CgkJdmFyIHJlc3VsdCA9IFJlZ2V4LlJlcGxhY2UocywgIiNbQS1aYS16MC05XSsoPVwiXCIpIiwgbT0+IAoJCSAgICBzdHJpbmcuRm9ybWF0KCJ7MH17MX17Mn0iLCAKCQkgICAgICAgbS5WYWx1ZS5TdWJzdHJpbmcoMCwgbS5Hcm91cHNbMV0uSW5kZXgpLAoJCSAgICAgICBuZXcgc3RyaW5nKCc/JywgbS5Hcm91cHNbMV0uTGVuZ3RoKSwKCQkgICAgICAgbS5WYWx1ZS5TdWJzdHJpbmcobS5Hcm91cHNbMV0uSW5kZXgrbS5Hcm91cHNbMV0uTGVuZ3RoLCBtLlZhbHVlLkxlbmd0aC1tLkdyb3Vwc1sxXS5JbmRleC1tLkdyb3Vwc1sxXS5MZW5ndGgpKSk7CgkJQ29uc29sZS5Xcml0ZUxpbmUocmVzdWx0KTsKCX0KfQ==