A regular expression to match a ZIP archive file path.
/((\/|\\|\/\/|https?:\\\\|https?:\/\/)[a-z0-9\[email protected]\-^!#$%&+={}.\/\\\[\]]+)+\.zip$/i
Matches:
- https://regexpattern.com/file.zip
- /path/to/file.zip
Non-matches:
- https://regexpattern.com/file.rar
- https://regexpattern.com/file.zip/
See Also:
Rate This Regex
User Review
( votes)Expression Flags
Flags | Description |
---|---|
i |
Ignore case sensitive. |
g |
Allows global search. |
m |
Allows multiline search. |