fork(1) download
  1. <?php
  2. $line = "Jane Doe <jane.doe@example.com>";
  3.  
  4.  
  5. if (preg_match("/([^<]*)<([^>]*)>/", $line, $match)) :
  6. $name=$match[1];
  7. $email=$match[2];
  8. print "Name: ". $match[1];
  9. print "\nEmail Id: ". $match[2];
  10. endif;
  11. ?>
Success #stdin #stdout 0s 82944KB
stdin
Standard input is empty
stdout
Name: Jane Doe 
Email Id: jane.doe@example.com