title: Remove whitespace except non-breaking spaces
body: <p>I'm using the following JS code to replace one or more consecutive whitespace characters with a single space character:</p>
  
  <pre><code>textContent.replace(/\s+/g, ' ');
  </code></pre>
  
  <p>I would like to modify the regex to ignore non-breaking spaces.</p>
  
  <p>For example, this:</p>
  
  <pre><code>ABC   \u00a0\u00a0XYZ
  </code></pre>
  
  <p>Should result in this:</p>
  
  <pre><code>ABC \u00a0\u00a0XYZ
  </code></pre>