title: Email Regular Expression PHP
body: <p>I have an string and I need an email ID parsed from that string. I have used PHP regular expression for retrieving and worked fine. But my problem is if the email prefix contains the regex.</p>
  
  <pre><code>&lt;?php
  $convert = "mailto:xxxin@yahoo.inATTENDEE";
  
  preg_match_all('/mailto:(.*?)(.com|.org|.net|.in)/', $convert, $emails);
  
  echo "&lt;pre&gt;";
  print_r($emails);
  echo "&lt;/pre&gt;";
  ?&gt;
  </code></pre>
  
  <p>Output:</p>
  
  <p>Array
  (</p>
  
  <pre><code>[0] =&gt; Array
      (
          [0] =&gt; mailto:xxxin
      )
  
  [1] =&gt; Array
      (
          [0] =&gt; xx
      )
  
  [2] =&gt; Array
      (
          [0] =&gt; xin
      )
  </code></pre>
  
  <p>)</p>
  
  <p>But I'm expecting <code>[0] =&gt; mailto.xxxin@yahoo.in</code>. Please help me to achieve this.</p>