Hi,
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
# Perl
while(<>){
chomp;
if(/XXX/){
// non-image
}
}
// PHP
foreach($files as $file){
if(preg_match('/XXX/',$file){
// non-image
}
}
I know it can be done using negation like below, but I was looking for something without using negation.
if(!/\.jpg$/)
{
}
Also please provide a brief explanation of how your Regex work, if possible
thanks in advance