fork(1) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text.RegularExpressions;
  6.  
  7. public class Test
  8. {
  9. public static void Main()
  10. {
  11. string mainstring = "<para> This is a test paragraph </para>";
  12. string regex1 = @"(<\w+[^<>/]*>)\s+|\s+(</\w+>)";
  13. mainstring = Regex.Replace(mainstring, regex1, "$1$2");
  14. Console.WriteLine(mainstring);
  15. }
  16. }
Success #stdin #stdout 0.03s 134592KB
stdin
Standard input is empty
stdout
<para>This is a test paragraph</para>