I have a string that is built out of three parts. The word I want the string to be (changes), a seperating part (doesn\'t change) and the last part which changes. I want to
You can use this
String substr = mysourcestring.substring(0,mysourcestring.indexOf("-"));