I have some html string which can have an tag, like this:
<p> blablabla <img> an image</img> again blablabla</p>
I want to remove the image tag, and get the part before and after in a string array.
edit: After calling
String[] splitted = htmlStr.split("regex");
Result would be:
splitted[0] = "<p> blablabla ";
splitted[1] = "again blablabla</p>"
I'd say a regex is required, mind that img tag can be different from string to string: it can have one or more attributes for example.