fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string example = "aaaaaaaaXbbbbXaaaaaa";
  8. int firstXposition = example.IndexOf("X");
  9. int LastXposition = example.LastIndexOf("X");
  10. Console.WriteLine(example.Substring(firstXposition + 1, LastXposition - firstXposition -1));
  11.  
  12.  
  13. }
  14. }
Success #stdin #stdout 0.05s 33976KB
stdin
Standard input is empty
stdout
bbbb