I have a line with several sets of brackets, and each set of brackets contains several <br> tags. For example, one fragment can read:
<p>some text<br>[text<br> text text<br>text]<br>some more text<br>[text]</p>
I need to remove <br> tags in brackets, but not <br> tags outside of brackets. I tried to do this with a .replace and .indexOf () loop, but it removed the <br> tags outside the brackets. Any ideas? Thanks!
source share