I am trying to replace this string
String sampl = "Mab by Gap David . Leave my Food"
with this code:
String authorf = sampl.replace(".","").replaceAll("Leave.","");
so that at the end I will have only Mab by Gap David
.
But currently I am getting Mab by Gap David my Food
Please how do I get only Mab by Gap David
?