What will be the regular expression to accept all type of file formats except zip format?
.*
accepts all types of files. But I don't want zip files. So what will be regex in this case?
Thanks.
You just need to use a negative lookahead to ensure your input doesn't end with .zip for which you can use this regex,
^(?!.*\.zip$).+$
Here ^ and $ match start and end of line and (?!.*\.zip$) negative lookahead ensures it doesn't match a text ending with .zip and .+ matches any character one or more.