fork download
  1. <?php
  2.  
  3. $text='<html>
  4.  
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  7. <title>Nova pagina 1</title>
  8. </head>
  9.  
  10. <body>
  11. <table>
  12. <tr>
  13. <td bgcolor=#ECEDE8>21/11/2009<br>08:05:38</td>
  14. <tr>
  15. <td bgcolor=#ECEDE8>
  16. <font size=1 class="slk">Status<br>Inativo<br>
  17. <a href="gerenciar_usuarios.asp?p=1&codativacao=116034&codlist=&#8204;&#8203;30" style="font-family:Trebuchet MS,tahoma,arial,verdana; font-size:12px; color: #ffffff; text-decoration:none; background: #109809;">
  18. &nbsp;Ativar Cadastro&nbsp;</u></a></td>
  19.  
  20. <td bgcolor=#ECEDE8>
  21. <font class="slk"></td>
  22. <td bgcolor=#ECEDE8>
  23. <font class="slk"> email@email.com.br</td>
  24.  
  25. <td bgcolor=#ECEDE8>
  26. <font class="slk"></td>
  27. <td bgcolor=#ECEDE8>
  28. <font class="slk"> email2@email2.com.br</td></tr></table>
  29. </body>
  30.  
  31. </html>';
  32.  
  33. "/[a-z0-9]+[_a-z0-9\.-]*[a-z0-9]+@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})/i",
  34. $text,
  35. $matches
  36. );
  37.  
  38. $email = reset($matches[0])."\n";
  39.  
  40. echo $email;
  41.  
  42.  
Success #stdin #stdout 0s 82944KB
stdin
Standard input is empty
stdout
email@email.com.br