Its not a good question to ask here. You should learn about C# or VB.Net string manipulation. There are many ways to achieve this.
BTW here is one
string str="string1--->string2--->string3--->string4--->string5";
str.Substring(1, str.LastIndexOf(">") - 5);