title: Why is this JavaScript regex slow?
body: <pre><code>var email = '[John Smith] &lt;johnsmith@gmail.com&gt;';
  
  var re1 = /.*&lt;+(.*)+&gt;.*/;
  var re2 = /.*\[+(.*)+\].*/;
  
  var address = email.replace(re1, "$1");
  var name = email.replace(re2, "$1");
  </code></pre>
  
  <p>I am finding that the 2nd regex (to get the name) runs super slow. but the first one is fine. Why is this and is there a better way to get the strings that I need?</p>