java replace after text put on ' 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];
String result = input.split("-")[0];
result = result.split("\n")[0];