title: RegEx for Javascript (replace function) to allow only letters and spaces, but not start with space?
body: <p>Well, in the <code>keydown</code> event of a textbox I need (with <code>regex</code> and <code>replace</code>):</p>
  
  <ol>
  <li>The first character don't be space.</li>
  <li>Allow only letters.</li>
  <li>Allow a one space only in the whole string between words. But, how
      its in a <code>keydown</code> event, if the user keeps the space key pressed,
      it only has to be a one space in the textbox.</li>
  </ol>
  
  <p>Some examples:</p>
  
  <p><strong>don't pass</strong> <code>' My name is'</code> (the first character is space)</p>
  
  <p><strong>pass</strong> <code>'My name is '</code> (doesn't matter space)</p>
  
  <p><strong>don't pass</strong> <code>'My name is 123'</code> (contain numbers)</p>
  
  <p>I have tried this to work with only one space:</p>
  
  <pre><code>replace(/\s+/g,' ');
  </code></pre>
  
  <p>and works, but I don't know how to do it with the other things in the same regex.</p>