I am trying to match files names. The names have the format:
abc_abc.jpg or
abc_abc_abc.png
abc_abc.thumb.jpg
I am trying to weed out the thumb.jpg from the list using the preg_match() function.
I have tried perl regex patterns such as:
{.[(thumb)].[(jpg)|(png)]}
/.[thumb].jpg/
and others.
I am trying to NOT to match file names with the ".thumb". I want to watch files that don't contain the ".thumb" string. (Is it just me or are negations harder?)
Last complication, the pattern has to be passed via an http GET such as:
http://www.olsendesign.net/random_Image.php?pattern={.*[(thumb)].[(jpg)|(png)]}
the script uses the GD library to return a random image from a fixed directory. I would like to use the pattern variable to pass the pattern so the script can return a single random image name from an listing of the entire dir.
Thanks in advance for any suggestions.
Pete