fork(1) download
  1. <?php
  2.  
  3. $text = "цена 200, цена 400, цена 600.";
  4. preg_match_all("/цена ([0-9]+)/", $text, $matches, PREG_PATTERN_ORDER);
  5. $lastprice = end($matches[1]);
  6. echo $lastprice;
  7.  
  8. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
600