public static void Main()
var label = "3.3-2020-09123-cenas";
Console.WriteLine($"Feature name: {GetFeatureName(label)}");
Console.WriteLine($"Feature name: {GetFeatureName(label2)}");
private static string GetFeatureName(string branchName)
var hyphenIndex = branchName.IndexOf('-');
return hyphenIndex > 0 ? branchName.Substring(hyphenIndex) : string.Empty;