fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. private static string SpecialReplace(string text)
  6. {
  7. var result = text.Replace(',', '.');
  8. return result;
  9. }
  10. public static void Main()
  11. {
  12. string text = "version=\"1,0,0\"";
  13. var regex = new Regex(@"version=""[\d,]*""");
  14. var result = regex.Replace(text, x => SpecialReplace(x.Value));
  15. Console.WriteLine(result);
  16. }
  17. }
Success #stdin #stdout 0.08s 24528KB
stdin
Standard input is empty
stdout
version="1.0.0"