PCRE to filter files on extension

Shanecito

New Member
I need a PCRE(Perl Compatible Regular Expression) that will match all non-images(jpg,png,tiff) from a list of files. So I need something go in place of XXX\[code\]# Perlwhile(<>){chomp;if(/XXX/){// non-image}}// PHPforeach($files as $file){ if(preg_match('/XXX/',$file){// non-image}}\[/code\]I know it can be done using negation like below, but I was looking for something without using negation.\[code\]if(!/\.jpg$/){}\[/code\]Also please provide a brief explanation of how your Regex work, if possiblethanks in advance
 
Top