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 = "b \r\n \r\n \r\n \r\n \r\n\r\n\r\n b c d e f \r\n g \r\n \r\n\r\n\r\n \r\n\r\n \r\n \r\n";
  9. string result = Regex.Replace(input, @"\s*\r\n\s*", "\r\n");
  10. System.Console.WriteLine(result);
  11. }
  12. }
Success #stdin #stdout 0.07s 37288KB
stdin
Standard input is empty
stdout
b
b c d e f
g