String result = input.split("-")[0];
String s = "the text=text"; String s1 = s.substring(s.indexOf("=")+1); s1.trim();