match extensions with regular expresion

hello to all!

I'm new to python , worked with regexp in javascript only, and I'm stuck with one little problem, I want to know if File has extension: .zip .7z .gz .tar ...(only Compressed Files).

But if it's .rar, it must not be xxx.partN.rar ('N' is a number and 'xxx' can be anything) UNLESS 'N' is '1' or '01' '001' etc.

Any help will be greatly appreciated.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories