fork(2) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string input = @"\test";
  9. bool result = !Regex.IsMatch(input, @"[""'\\]+"); // result is true if no match
  10. if (!result) {
  11. Console.WriteLine("Comments cannot contain quotes (double or single) or slashes.");
  12. }
  13.  
  14. }
  15. }
Success #stdin #stdout 0.06s 34072KB
stdin
Standard input is empty
stdout
Comments cannot contain quotes (double or single) or slashes.