I am trying to match the portion of this string after the last forward slash:
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
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.
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.