fork(1) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. Regex re = new Regex("[.?!]*(?=[.?!]$)");
  9. Console.WriteLine(re.Replace("This is a string....!", ""));
  10. Console.WriteLine(re.Replace("his is another...!!", ""));
  11. Console.WriteLine(re.Replace("What is this..!?!?", ""));
  12. }
  13. }
Success #stdin #stdout 0.04s 134656KB
stdin
Standard input is empty
stdout
This is a string!
his is another!
What is this?