I'd like to split text at the begining and the end some tags (div and p) not all of them.
Input:
String html = "text<div>some text</div><tag>text</tag><span>asd</span><p>text</p>text";
Output:
text
<div>some text</div>
<tag>text</tag><span>asd</span>
<p>text</p>
text
What regex should i use?