if(!empty($options['file']) && is_dir($dir = \dirname($options['file']))){ // Build a regexp where the first root dirs are mandatory,
// but every other sub-dir is optional up to the full path in $dir
// Mandate at least 1 root dir and not more than 5 optional dirs.