I have this working, but I would like to take it one step further. Most of my content has two <br /> tags in a row to space out sentances. This is not how I want, but this is how it is. Since I load this content up into a textarea, I need to strip the <br /> tags and replace them with line breaks so the user does not see the break tags, I use:
replace(/<br \/>/g, "\n");
My problem comes because there are two (<br /><br />) tags right after one another, so the replace function creates two line breaks, which I don't want. Is there a way to check if there are two break tags, and if there are, only replace them with one line break?