Your try, \\.+?\.pdf matches:
I think what you would want, instead of matching As little anything as is possible, nongreedy you want Anything except a backslash.
More likely, you just want basename from File::Basename.
In reply to Re: Regexp match filename, exclude path
by Corion
in thread Regexp match filename, exclude path
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |