String tmp = "4 days ago <b>...</b> Jon founded the video <b>Yahoo</b>! and also";
I want to remove "4 days ago <b>...</b>" from the string.
Please let me know what is the best way to strip till the first tag.
String tmp = "4 days ago <b>...</b> Jon founded the video <b>Yahoo</b>! and also";
I want to remove "4 days ago <b>...</b>" from the string.
Please let me know what is the best way to strip till the first tag.
The better way is to use "real" HTML parser. But you can do it with regular expression as well. Try something like this:
String result = tmp.replaceFirst(".*?<b>.*?</b>", "");