in reply to Extracting file name from path

That's not working because it's looking for three w's at the end of the name. If you don't have to validate the file name, why not just something like:
m{([^\\/]+)$}