fork(3) download
  1. <?php
  2. $str = 'On 12-06-13 10:56 AM, "John Doe" <john.doe@some.tld> wrote:';
  3. $email = preg_match('/^On [^"]*"[^"]*" <([^>]*)> wrote:$/', $str, $re) ? $re[1] : '';
  4. print ($email);
  5. ?>
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
john.doe@some.tld