I need a PCRE (Perl Compatible Regular Expression) that will match all non- images (jpg, png, tiff) from the list of files. So I need to go something instead of XXX
while(<>){
chomp;
if(/XXX/){
}
}
foreach($files as $file){
if(preg_match('/XXX/',$file){
}
}
I know that this can be done using negation, as shown below, but I was looking for something without using negation.
if(!/\.jpg$/)
{
}
Also, please give a brief description of how your Regex works, if possible.
early
source
share