fork download
  1. <?php
  2. $string = <<< EOF
  3. Confirmation code:
  4.  
  5. Payout:
  6. €66 x 7 Nights: €461
  7. Airbnb Service Fee: -€17
  8. Total Payout: €444
  9. EOF;
  10.  
  11. preg_match_all('/.*(€\d+)/si', $string, $matches, PREG_PATTERN_ORDER);
  12. $totalPayout = $matches[1][0];
  13. echo $totalPayout;
  14. //€444
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
€444