fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string str = @"String = 'text'; /* Comment */
  8. /*
  9. Multiline comment
  10. */
  11. for (i := 0; i < 5; i++) {
  12. i+=1;
  13. }";
  14. var regex = new Regex(@"/\*(?:(?!\*/)(?:.|[\r\n]+))*\*/");
  15. var result = regex.Replace(str, "");
  16. Console.WriteLine(result);
  17. }
  18. }
Success #stdin #stdout 0.07s 34712KB
stdin
Standard input is empty
stdout
String = 'text'; 
        			  
        			  for (i := 0; i < 5; i++) {
        			  	i+=1;
        			  }