I'd like to select only files that starts with a number or a letter:
$files = glob($xsl_dir_path . "/[^a-zA-Z0-9]*.xsl");
$files = array_map('basename', $files);
There are 3 files: a.xsl, b.xsl, _functions.xsl. I don't want to select _functions.xsl file.
You are negating the class match, try:
$files = glob($xsl_dir_path . "/[a-zA-Z0-9]*.xsl");
$files = array_map('basename', $files);