fork(1) download
  1. using System;
  2. using System.IO;
  3. using System.Text.RegularExpressions;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. var temp="str1 str2 str3 ";
  10. var pattern=@"(\s)+";
  11. var tempArr=Regex.Split(temp.Trim(),pattern);
  12. Console.WriteLine("'{0}'", string.Join("','", tempArr));
  13. }
  14. }
Success #stdin #stdout 0.03s 134784KB
stdin
Standard input is empty
stdout
'str1',' ','str2',' ','str3'