fork download
  1. <?php
  2.  
  3. $log = <<<FIM
  4. ##################################################
  5. ----------------------------------------
  6. Nome: nome_user,
  7. Email: email@user.com,
  8. -------------------------------
  9. ,
  10. ----------------------------------------
  11. ##################################################
  12. FIM;
  13.  
  14. if( preg_match( '/Email:\s*(.*)\s*,/', $log, $matches ) ) {
  15. echo $matches[1];
  16. } else {
  17. echo 'Não encontrado';
  18. }
  19.  
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
email@user.com