fork download
  1. <?php
  2. $input = "script
  3. truc.domain
  4. machin.domain";
  5. if(preg_match_all('/\w+[.]domain$/m', $input, $matches))
  6. {
  7. print_r($matches[0]);
  8. }
  9. ?>
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Array
(
    [0] => truc.domain
    [1] => machin.domain
)