fork download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var str = "seq[]=8&seq[]=7&seq[]=5&seq[]=1&seq[]=4&seq[]=3&seq[]=6&seq[]=0&seq[]=2";
  9. var output = Tokenize(str);
  10.  
  11. foreach (string outputString in output)
  12. {
  13. Console.WriteLine(outputString);
  14. }
  15. }
  16.  
  17. private static List<string> Tokenize(string str)
  18. {
  19. str = str.Replace("&", String.Empty);
  20. string[] separators = new string[] {"seq[]="};
  21. return new List<string>(str.Split(separators, StringSplitOptions.None));
  22. }
  23.  
  24. }
Success #stdin #stdout 0.06s 34096KB
stdin
Standard input is empty
stdout
8
7
5
1
4
3
6
0
2