3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $pattern = '/(?:(RRP\:).*?([0-9\.\-a-z]+)).*?(?:(Now\:).*?([0-9\.\-a-z]+)).*(Available \(.*\)|Unavailable|Special)/i'; $subject = ' RRP: £42.50 Now: £38.25 Save £4.25 ✔ Available (16 Ready to ship now) '; preg_match($pattern,$subject,$m); var_dump($m);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(6) { [0]=> string(99) "RRP: £42.50 Now: £38.25 Save £4.25 ✔ Available (16 Ready to ship now)" [1]=> string(4) "RRP:" [2]=> string(5) "42.50" [3]=> string(4) "Now:" [4]=> string(5) "38.25" [5]=> string(32) "Available (16 Ready to ship now)" }