fork(1) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. // your code goes here
  9. string input = "This @#$[ываыв] %is text with some test data %$ dsffs !@#$%";
  10. string pattern = "[-.,(){}@#$%^&*!+=:;/\\[\\]]+";
  11. string replacement = "";
  12. Regex rgx = new Regex(pattern);
  13. string result = rgx.Replace(input, replacement);
  14.  
  15. Console.WriteLine("Original String: {0}", input);
  16. Console.WriteLine("Replacement String: {0}", result);
  17. }
  18. }
Success #stdin #stdout 0.03s 30120KB
stdin
Standard input is empty
stdout
Original String: This @#$[ываыв] %is text with some test data %$ dsffs !@#$%
Replacement String: This ываыв is text with some test data  dsffs