fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string[] values = {"12356.56@Firefox 1@23423",
  8. "12356.56@Chrome2.0@23423",
  9. "3423@Firefox 14.0@sdfsd"
  10. };
  11. foreach (string value in values)
  12. Console.WriteLine(value + ": " + GetBrowser(value));
  13. }
  14.  
  15. public static string GetBrowser(string myValue)
  16. {
  17. var parts = myValue.Split('@');
  18. var browser = parts[1].Split(' ','0','1','2','3','4','5','6','7','8','9');
  19. return browser[0];
  20. }
  21. }
Success #stdin #stdout 0.04s 36904KB
stdin
Standard input is empty
stdout
12356.56@Firefox 1@23423: Firefox
12356.56@Chrome2.0@23423: Chrome
3423@Firefox 14.0@sdfsd: Firefox