title: checking whether a string contains any special character or string in javascript
body: <p>I want to check whether a string has any special characters or not. I am using this script:</p>
  
  <pre><code>var name = $("#name").val();
  if(name.match(/[_\W]0-9/))
  {
      alert('Not A Name');
  }
  </code></pre>
  
  <p>It doesn't alert even when <code>name="sas23"</code></p>