fork download
  1. using System;
  2. using System.Linq;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string testString = @"\testest\sometestvalue_ withspaces\testtest2\sometestvaluewith:and!";
  8. var splits = testString.Split('\\').Where((x, i) => i%2 == 0);
  9. foreach (var s in splits)
  10. {
  11. Console.WriteLine(s);
  12. }
  13. }
  14. }
Success #stdin #stdout 0.02s 34872KB
stdin
Standard input is empty
stdout
sometestvalue_ withspaces
sometestvaluewith:and!