fork(2) download
  1. <?php
  2.  
  3. $str = "/Duitsland|/groepsreizen fietsen|Stars/1";
  4.  
  5. preg_match("/\w+/i", $str, $matches);
  6.  
  7. $first_word = array_shift($matches);
  8.  
  9. echo $first_word;
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Duitsland