title: Using Javascript, how to capitalize each word in a String excluding acronyms ?
body: <p>I was trying the following solution,which works great, but I have an additional requirement where I need to exclude the acronyms (words in all caps) from the conversion.</p>
  
  <pre><code>String.prototype.capitalize = function(lower) {
      return (lower ? this.toLowerCase() : this).replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); });
  };
  </code></pre>
  
  <p>Any idea on how this can be done ? </p>