I have a url that contains a filename. I would like to create a function that uses a regular expression to isolate a file name and then save it as a variable. Setting up the function, and saving the string as a variable is fairly straight forward. I am struggling with regular expression to isolate the string.
Below is an example of a url that I am working with.
I would like to grab the filename located in between "/" and "?"
So the value I am looking for is "lovecraft-05.epub"