title: Regex invalid group error while using in javascript
body: <p>I have the following regex that checks for multiple types of email address inputs</p>
  
  <pre><code>[\W"]*(?&lt;name&gt;.*?)[\"]*?\s*[&lt;(]?(?&lt;email&gt;\S+@[^\s&gt;)]+)[&gt;)]?
  </code></pre>
  
  <p>I got this off <a href="https://stackoverflow.com/questions/9244430/how-do-i-regex-a-name-and-an-email-out-of-the-3-major-email-clients-in-ruby">How do I regex a name and an email out of the 3 major email clients in ruby?</a></p>
  
  <p>The problem i am facing is that while using this in javascript i get an error "Uncaught SyntaxError: Invalid regular expression: <code>/[\W"]*(?"&lt;name&gt;".*?)[\"]*?\s*[&lt;(]?(?"&lt;email&gt;"\S+@[^\s&gt;)]+)[&gt;)]?/</code>: Invalid group "</p>
  
  <p>I spent an entire day trying to fix this and i found out that the problem has something to do with <strong>lookbehind</strong> That javascript doesn't support</p>
  
  <p>I'm very bad at regex expressions and need some advice. Can someone please point me in the right direction.</p>
  
  <p>PS: I am trying to make this function to integrate it with jquery validate plugin </p>
  
  <p><a href="http://jqueryvalidation.org/" rel="nofollow noreferrer">Jquery Validation</a></p>