I have a string like:
\"super exemple of string key : text I want to keep - end of my string\"
I want to just keep the string which is betw
string str="super exemple of string key : text I want to keep - end of my string"; int startIndex = str.IndexOf("key") + "key".Length; int endIndex = str.IndexOf("-"); string newString = str.Substring(startIndex, endIndex - startIndex);