fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var lst = new List<string>() {"http://w...content-available-to-author-only...a.com/docs/changelogs/unified/1215/",
  9. "http://w...content-available-to-author-only...a.com/docs/changelogs/anythingelse/anything/1215/",
  10. "http://w...content-available-to-author-only...a.com/security/advisory/1047",
  11. "http://w...content-available-to-author-only...a.com/security/advisory/1048/",
  12. "http://w...content-available-to-author-only...a.com/doesnt/matter/could/be/anything/1049/"};
  13. lst.ForEach(m => Console.WriteLine(
  14. m.Contains("/changelogs/") ? "" : m.Trim('/').Split('/').LastOrDefault()
  15. ));
  16. }
  17. }
Success #stdin #stdout 0.04s 24024KB
stdin
Standard input is empty
stdout

1047
1048
1049