fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string str = @"script.setAttribute(""src"", dbn_protocol+""path to js"");";
  8. var regex = new Regex(@"dbn_protocol\+""[^""]+""");
  9. var result = regex.Replace(str, "something else");
  10. Console.WriteLine(result);
  11. }
  12. }
Success #stdin #stdout 0.06s 34128KB
stdin
Standard input is empty
stdout
script.setAttribute("src", something else);