Regex To Match Strings After The Last Slash In A String

A regular expression that matches everything after the last slash in a string (like a URL or a file/folder path).

Can be useful in finding out file names or query strings in a URL.



  • /path/to/regex


  • /path/to/regex/

See Also:

Regex Is Copied!