Stumped on a PCRE for use in PHP class

I am trying to match the portion of this string after the last forward slash:

'/MyPHPWorkingScripts/nextprevbutton/test_page_01.php'

so, in this case I would want to match ‘test_page_01.php’.
I’ve tried using so many patterns but they all match the whole thing, not the part after the last forward slash, even if I use lazy quantifiers.
I use this one

'#/.*?\\Z#'

That should match everything between the last forward slash and the end of the string, because it’s the lazy quantifier, but it doesn’t. Can someone please explain why that pattern doesn’t work. Thanks.

There’s a function for that.

[basename](http://php.net/basename)('/MyPHPWorkingScripts/nextprevbutton/test_page_01.php')

If you really want a regex, ask for the series of non-slash characters at the end of the string.

~[^/]+$~

Thanks very much, basename() is the perfect solution.