fork(1) download
  1. <?php
  2. $msg = '
  3. asdas asdasd asdas aline_ca1@hotmail.com asdasd asdas asdas
  4. asdas asdasd asdas aline_ca2@hotmail.com asdasd asdas asdas
  5. ';
  6. preg_match('/([_\-.a-zA-Z\d]{1,30})@([_\-.a-zA-Z\d]{1,30})([.]{1})([_\-.a-zA-Z]{1,10})/', $msg, $output);
  7.  
  8. var_dump($output);
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
array(5) {
  [0]=>
  string(21) "aline_ca1@hotmail.com"
  [1]=>
  string(9) "aline_ca1"
  [2]=>
  string(7) "hotmail"
  [3]=>
  string(1) "."
  [4]=>
  string(3) "com"
}