There are two simple ways of answering this question. One is to give you what you asked for: a regex to get the filename component from a UNIX-style path. That regex is m|(.[^/]+)$/ (Read: a bunch of non-slash characters (the maximum number possible, more or less), then the end of the string (with various caveats on exactly what the end of string means).
The other is to inform you of the right way to do it, which is to use File::Basename, which will do the right thing regardless of platform, and also makes the intent of your code more clear.
In reply to Re: Simple Regex needed
by theorbtwo
in thread Simple Regex needed
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |