I'm trying to replace any <br />
tags that appear AFTER a </h2>
tag. This is what I have so far:
Text = Text.replace(new RegExp("</h2>(\<br \/\>.+)(.+?)", "g"), '</h2>$2');
It doesn't seem to work, can anyone help? (No matches are being found).
Test case:
<h2>Testing</h2><br /><br /><br />Text
To:
<h2>Testing</h2>Text
` and `##title##` into `
Title
` but now I just want to remove all trailing `` after the `h2` or it looks bad. – Tom Gullen Apr 28 '11 at 22:43