title: Regex groups, untill last occurence within group
body: <p>I am currently learning regex and it is going fine. I now want to make a checker for email addresses. Basically its all good, I just found myself stuck at one small problem which I cannot seem to solve.</p>
  
  <p>I saw that you can use "lookaround" options, but I cannot get them to work.
  What I want is that my group matches until the LAST <code>@</code> sign. So for example</p>
  
  <p><code>my-email@outlook.com</code> would give me back <code>my-email</code>.
  <code>my-@-email@outlook.com</code> would give me back <code>my-@-email</code>.</p>
  
  <p>Unfortunately my code would give me back <code>my-</code> only because I stop at the <code>@</code> sign.</p>
  
  <p>Below is my reg-ex and the email addresses I check on.</p>
  
  <p>I hope that someone can explain to me how I can manage it to find everything, in other words email addresses that have multiple ampersands in them too.</p>
  
  <pre><code>([a-zA-z0-9._\-!#$%&amp;'*+\/=?^_`{|}~"\(\)&lt;&gt;:,;]+|\"[a-zA-z0-9._\-!#$%&amp;'*+\/=?^_`{|}~"\(\)&lt;&gt;:,; @]+\")@([a-zA-Z0-9\-]+|\[(.*)\])\.?([a-zA-Z0-9\-]+)?
  </code></pre>
  
  <p>the email adresses I check for (only 2 not working which are <code>john.smith@worldwideweb.123com_org</code> and <code>"John."(),:;&lt;&gt;@[\].Doe"@.123radio_tv)</code>.</p>
  
  <pre><code>info@kamikaze.uk
  alfred@live.nl
  dubai@organon.it
  karel.de.koning@hetnet.nl
  decock@upc.nl
  jiazhe_xu@sina.cn
  xfunkblasterx@yahoomail.org
  super-duper-email@hotmail.com
  
  "John..Doe"@example.com
  john.smith(comment)@example.com
  (comment)john.smith@example.com
  john.smith@worldwideweb.123com_org
  "John."(),:;&lt;&gt;@[\].Doe"@.123radio_tv
  "much.more unusual"@example.com
  other.email-with-dash@example.com
  disposable.style.email.with+symbol@example.com
  "()&lt;&gt;[]:,;@\\"!#$%&amp;'-/=?^_`{}| ~.a"@example.org
  
  smith@[IPv6:2001:db8::1]
  jsmith@[192.168.2.1]
  </code></pre>
  
  <p>Best regards</p>
  
  <p>P.S. I use <a href="https://regex101.com/" rel="nofollow noreferrer">https://regex101.com/</a> to check the regex with the provided email addys</p>