title: Extract email from field using Oracle Regexp
body: <p>I want to get e-mail formed texts in a field. I have tried sql below but no luck. See <a href="http://sqlfiddle.com/#!4/d41d8/23829" rel="nofollow">SqlFiddle</a>. Removing ^ and $ from regexp not working too.</p>
  
  <pre><code>WITH TEST_DATA AS (
    SELECT 'foo@gmail.com' AS EMAIL FROM DUAL UNION ALL 
    SELECT 'mail foo@gmail.com' FROM DUAL UNION ALL           
    SELECT 'mail foo@gmail.com sent' FROM DUAL UNION ALL                
    SELECT 'foo@gmail.com sent count 23' FROM DUAL UNION ALL          
    SELECT 'mail already sent to foo@gmail.com and foo@hotmail.com' FROM DUAL UNION ALL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    SELECT 'foo@gmail.com sent count 23' FROM DUAL             
  )SELECT REGEXP_SUBSTR(EMAIL,'^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$') MAIL
   FROM TEST_DATA;
  </code></pre>
  
  <p>Expected output for this dataset</p>
  
  <pre><code>foo@gmail.com 
  foo@gmail.com 
  foo@gmail.com 
  foo@gmail.com 
  foo@gmail.com, foo@hotmail.com 
  foo@gmail.com
  </code></pre>
  
  <p>Any help appreciated.</p>