fork(4) 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. $start = 'Email:';
  15. $end = ',';
  16.  
  17. $pos1 = strpos( $log, $start );
  18. $pos2 = strpos( $log, $end, $pos1 );
  19. $block = trim( substr(
  20. $log, $pos1 + strlen( $start ),
  21. $pos2 - $pos1 - strlen( $start )
  22. ) );
  23.  
  24. echo $block;
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
email@user.com