title: Accept dots and whitspaces in javascript
body: <p>I am using javascript to check if the username match the criteria. </p>
  
  <pre><code>// Check the username
  re = /^\w+$/; 
  if(!re.test(form.username.value)) { 
      alert("Alert"); 
      form.username.focus();
      return false; 
  }
  </code></pre>
  
  <p>In the current state the script accepts letters, numbers and underscores. I also want to accept dots and whitespaces.</p>
  
  <p>Does someone know what I need to change in <code>/^\w+$/</code> to accept dots and whitspaces?</p>