title: How do I replace “<br /><br />” with “<br />” in HTML using JavaScript and jQuery?
body: <p>I have validation summary that sometimes has multiple <code>br</code> tags at the end like below:</p>
  
  <pre><code>&lt;div id="ValidationSummary1" class="alert alert-error"&gt;
      Last 4-digits of Social Security number does not match 
      the Member record on file for the Member ID number you 
      have entered.&lt;br /&gt;
      Date of Birth does not match the Member record on file for the Member ID 
      number you have entered.&lt;br /&gt;&lt;br /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to find anytime there are two <code>br</code> tags back to back and replace it with one like below:</p>
  
  <pre><code>$('#ValidationSummary1').replace('&lt;br /&gt;&lt;br /&gt;', '&lt;br /&gt;');
  </code></pre>
  
  <p>I understand there isn't a <code>replace()</code> function.  What would be the alternative to something simple like this?</p>