I have a string say
\"Hello! world!\"
I want to do a trim or a remove to take out the ! off world but not off Hello.
string helloOriginal = "Hello! World!"; string newString = helloOriginal.Substring(0,helloOriginal.LastIndexOf('!'));