fork(1) download
  1. <?php
  2.  
  3.  
  4. $regexp = '/([a-zA-Z0-9_+.-]+)@([a-z.-]+)/';
  5. $text = 'fiejifewif anon@mail.ru, fesf: 124 @feef pokushat@prines.brat';
  6.  
  7. $email = array();
  8.  
  9. preg_match_all($regexp, $text, $email);
  10.  
  11. var_dump($email[0]);
Success #stdin #stdout 0.02s 82944KB
stdin
Standard input is empty
stdout
array(2) {
  [0]=>
  string(12) "anon@mail.ru"
  [1]=>
  string(20) "pokushat@prines.brat"
}