Looking for a regular expression that can replace everything except the file name in a path like this:
/folder1/folder2/folder3/anything/somefile.html
Can someone demonstrate how to do this using the replace method? The goal is to remove the entire path and keep only the file, which could be anything.
Appreciate any help!