private static string DeriveNiceNameFromClassName(string className) { var nameWithoutCode = className.Substring(6); var nameWithSpaces = Regex.Replace(nameWithoutCode, @"([^_])([A-Z])", "$1 $2"); return nameWithSpaces.Replace("_", "-"); }