tags:

views:

50

answers:

1

this pattern will get me all files that begin with a nr and it works perfectly.

glob("path_to_dir/^[0-9]*");

but i want to have a pattern that gets me all files that ends with _thumbnail regardless file extension.

eg.

1.jpg
1_thumbnail.jpg
2.jpg
2_thumbnail.png

will get me

1_thumbnail.jpg
2_thumbnail.png

i have tried:

glob("path_to_dir/(_thumbnail)");

but it didnt work.

would appreciate a little help.

+4  A: 

Will this do it?

glob('path_to_dir/*_thumbnail.*');
Alix Axel
This look like wildcards, not regular expressions...
neo
it did perfeclty=)
weng