Python 2.5
Hi all, can anybody tell me how to say "if a jpeg file does NOT have 'gallery_' in the first bit" using the python re module. Something like this:
[code=python]
re.compile('^ga llery_[^|]{1,256}.jp[e]{0,1}g$', re.I)
[/code]
The problem seems to be with the first bit "^gallery_" which is wrong, it just returns all the files that do have "gallery_" in the first bit.
Hi all, can anybody tell me how to say "if a jpeg file does NOT have 'gallery_' in the first bit" using the python re module. Something like this:
[code=python]
re.compile('^ga llery_[^|]{1,256}.jp[e]{0,1}g$', re.I)
[/code]
The problem seems to be with the first bit "^gallery_" which is wrong, it just returns all the files that do have "gallery_" in the first bit.
Comment