fork(36) download
  1. using System;
  2. using System.Linq;
  3. using System.Text.RegularExpressions;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. var s = "#Abc=\"\"";
  10. var result = Regex.Replace(s, "#[A-Za-z0-9]+(=\"\")", m=>
  11. string.Format("{0}{1}{2}",
  12. m.Value.Substring(0, m.Groups[1].Index),
  13. new string('?', m.Groups[1].Length),
  14. m.Value.Substring(m.Groups[1].Index+m.Groups[1].Length, m.Value.Length-m.Groups[1].Index-m.Groups[1].Length)));
  15. Console.WriteLine(result);
  16. }
  17. }
Success #stdin #stdout 0.04s 134208KB
stdin
Standard input is empty
stdout
#Abc???