title: How replace Space ONLY before and after Character not before and after number
body: <p>all i tryed and found, will remove all spaces. But thats not what i want</p>
  
  <p>my string is</p>
  
  <pre><code> var str = "24 july 2014 12 5";
  </code></pre>
  
  <p>i want </p>
  
  <pre><code>"24july2014 12 5"
  </code></pre>
  
  <p>i found this code example</p>
  
  <pre><code>var str = "Paul m'a dit « Bonjour ! »";
  str = str.replace(/\s([!:\?…;»])/g, function (el1, el2) {
  return '&amp;nbsp;' + el2;
  }).replace(/(«)\s/g, function (el1, el2) {
  return el2 + '&amp;nbsp;';
  });
  console.log(str);
  </code></pre>
  
  <p>but its not changeable to my problem. maybe i`am too much noob?</p>