3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $regex = '@^/cef/?((?:(?!/logs/).)*)$@'; var_dump(preg_match($regex, '/cef/foo/bar/baz', $matches), $matches); var_dump(preg_match($regex, '/cef/foo/logs/access.log', $matches), $matches);
Output for 4.3.0 - 7.1.0
int(1) array(2) { [0]=> string(16) "/cef/foo/bar/baz" [1]=> string(11) "foo/bar/baz" } int(0) array(0) { }