3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match("/^(\w+)*(-\w+)?/", "delivery",$matches); print_r($matches); echo "\n"; preg_match("%^(\w+)\-\w+?$%", "about-us",$matches); print_r($matches);
based on I3Ins
Output for 4.3.0 - 7.2.0
Array ( [0] => delivery [1] => delivery ) Array ( [0] => about-us [1] => about )