title: regex - add space before any character that is not a letter
body: <p>I have tried many things and am looking for a space to be added after any character that is not a letter. Currently I can replace all non letter characters with a space, but I want a space <strong>before</strong> the character is matched. At the moment I have:</p>
  
  <pre><code>var str = 'div#some_id.some_class';
  str = str.replace(/[^A-Za-z0-9]/g, ' ');
  </code></pre>
  
  <p>This provides me with the following, </p>
  
  <pre><code>div some_id some_class
  </code></pre>
  
  <p>however I am looking for the result to be <code>div #some_id .some_class</code></p>
  
  <p>Any help would be greatly appreciated.</p>