I need to replace(escape) all html tags except of <br> tag with <tag>. I have tried following:
String text = "<br><tag>";
text.replaceAll("<[^br]", "<");
which replace the first character of tag:
$34 ==> "<br><ag>"
Any idea how to aproach this without having to parse and save the first character first and then add it to regex?