3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = "reports/683868-derger-gergewrger.html"; $pattern = "/(?:(\d+)\/|)reports\/(\d+)-([\w-]+).html/Axu"; preg_match($pattern, $string, $m); var_dump($m);
based on oH5dQ
Output for 4.3.0 - 7.2.0
array(4) { [0]=> string(37) "reports/683868-derger-gergewrger.html" [1]=> string(0) "" [2]=> string(6) "683868" [3]=> string(17) "derger-gergewrger" }