3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match("/^(img|js|css)\/(?P<path>[\/a-zA-Z0-9\-._~!$&'()*+,;=:@]+)$/", 'img/asasas/43l2kj.llasd.', $m); var_dump($m);
Output for 4.3.3 - 7.1.0
array(4) { [0]=> string(24) "img/asasas/43l2kj.llasd." [1]=> string(3) "img" ["path"]=> string(20) "asasas/43l2kj.llasd." [2]=> string(20) "asasas/43l2kj.llasd." }
Output for 4.3.0 - 4.3.2
array(3) { [0]=> string(24) "img/asasas/43l2kj.llasd." [1]=> string(3) "img" [2]=> string(20) "asasas/43l2kj.llasd." }