i’m not sure of the code i write but you can find something like this:
String data="blah blah blah";
int index = data.indexOf("http");
String subString = str.substring(index, data.length()-1);
solved Remove a word starting with x in a sentence [closed]