I like to use PHP to get all the filenames in a directory except if the filename contains a certain word, for example "thumbnail".
This is how I get all the image filenames:
$images = glob($imagesDir . $albumName . '/' . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);
So I tried:
$images = glob($imagesDir . $albumName . '/' . '^(?!thumbnail$).*.{jpg,jpeg,png,gif}', GLOB_BRACE);
Apparently it would not return anything. I am not familiar with regular expression in PHP. Did I do something wrong?