title: Syntax error in Javascript pattern
body: <p>I'm getting a syntax error in this simple javascript code. I just want to check the atring on a pattern. Can any one tell me what is wrong?</p>
  
  <pre><code>var a = 'test@server.com';
  var pattern = [a-zA-Z0-9_]+[.[a-zA-Z0-9]+]*@[a-zA-Z0-9_]+[.[a-zA-Z]+]+;
  console.log('The comparison is ',a.match(pattern));
  </code></pre>
  
  <p>Thanks.</p>