fork(1) download
  1. <?php
  2.  
  3. $input = 'my address is @@address@@ and my house is at @@street@@ and the number is @@number@@ or so ';
  4. preg_match_all('/@@[a-z]+@@/', $input, $matches);
  5. $output = $matches[0];
  6. var_dump($output);
  7.  
Success #stdin #stdout 0.02s 25768KB
stdin
Standard input is empty
stdout
array(3) {
  [0]=>
  string(11) "@@address@@"
  [1]=>
  string(10) "@@street@@"
  [2]=>
  string(10) "@@number@@"
}