title: Email validation regex takes a long time to complete on medium-long strings
body: <p>After returning true or false with:</p>
  
  <pre><code>return (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,8})+$/.test(str));
  </code></pre>
  
  <p>Where str is testing123@testing123.testing123
  it takes about 25 seconds to complete.</p>
  
  <p>In general, shorter strings take less than 1 second.</p>
  
  <p>This is most likely due to back-tracking. I am not very good with Regex, can someone help me reduce the time it takes to process an email. E.g. it must have letter(s) then @ then letter(s) then . then letter(s) and must not be too long.</p>