fork download
  1. <?php
  2.  
  3. $str = 'txt stuff
  4. Administrative Contact:
  5. Brown, John support@xxxxxxx.com
  6. txt stuff';
  7.  
  8. preg_match('~admin[^:]*:\s*(.*)\s+\S+@~i', $str, $matches);
  9. var_dump($matches[1]);
Success #stdin #stdout 0.02s 13064KB
stdin
Standard input is empty
stdout
string(11) "Brown, John"