According to what I understand from your question. This may work for you.
string FormatString(string text)
{
// Get the last string and replace the "-" to space.
string output = text.split("https://stackoverflow.com/").Last().Replace("-"," ");
// convert it into title case
output = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(output);
return output;
}
solved Format a string, clear specific characters in a string? [closed]