title: How to replace 2 subsequent characters with single character
body: <p>There is a requirement to replace subsequent(2) single quotes(') with one single quote(') using regular expression in javascript. </p>
  
  <p>For example if the target string is "<strong>''''</strong>", Then after the replacement the resulting string should be "<strong>''</strong>" converting 4 single quotes in to 2 single quotes (matching 2 pairs and replacing them with 2 single quotes)</p>