android remove string part before certain character java code example
Example 1: java remove character from string after
String result = input.split("-")[0];
Example 2: replace everything before a character in java
result = result.split("\n")[0];