title: How to filter Chinese characters with regular expression in javascript
body: <p>I need a regular expression to test a string.
  The string can only contain English letters, number, hyphen and underscore. </p>
  
  <p>previously I have one to test a string whether it only contains positive numbers(zero included); I used:</p>
  
  <pre><code>if(!/^\d+$/.test(number)) {
      alert('..bla');
  } else {
      return true;
  };
  </code></pre>
  
  <p>So I want a similar one. I have read:</p>
  
  <p><a href="https://stackoverflow.com/questions/10746607/regular-expressions-and-chinese">Regular expressions and Chinese</a>;</p>
  
  <p>and <a href="https://stackoverflow.com/questions/2338044/regex-letters-numbers-dashes-and-underscores">Regex Letters, Numbers, Dashes, and Underscores</a>;</p>
  
  <p>But these two does not seem to fix my problem.</p>
  
  <pre><code>    !/[a-zA-Z0-9\-\_]+$/.test('_-bla')  // return false
      !/[a-zA-Z0-9\-\_]+$/.test('_-bl我a')  // return false
      !/[a-zA-Z0-9\-\_]+$/.test('_-bl我')  // return true
      !/[a-zA-Z0-9\-\_]+/.test('_-bl我')  // return false
      !/[a-zA-Z0-9\-\_]+/.test('_-bl我a') // return false
  </code></pre>
  
  <p>Thanks in advance. :)</p>