3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = '"4:01pm - n1234",+0.50'; preg_match_all('/\"(.*?)\s-\s(.*?)\",(.*)/', $str, $matches); //$matches[] = // Print the entire match result var_dump($matches);
based on Cl3Yo
Output for 5.6.0 - 5.6.30, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.3.0beta1
array(4) { [0]=> array(1) { [0]=> string(22) ""4:01pm - n1234",+0.50" } [1]=> array(1) { [0]=> string(6) "4:01pm" } [2]=> array(1) { [0]=> string(5) "n1234" } [3]=> array(1) { [0]=> string(5) "+0.50" } }