Regular Expression To Match ZIP Archive File Path

A regular expression to match a ZIP archive file path.

/((\/|\\|\/\/|https?:\\\\|https?:\/\/)[a-z0-9\s_@\-^!#$%&+={}.\/\\\[\]]+)+\.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:

Regex Is Copied!