For all you regular expression gurus:
I'm using PHP version 4.3.2 with Apache 1.3.27.
What I am trying to do is obtain the name of the file that the user is currently viewing. For example, if a user is at http://foo.com/bar/foo.php
I would like to obtain foo.php. As far as I can tell, the only way to do this is to use a regular expression to retrieve this information from the PHP _SERVER variables. In this instance, _SERVER["PHP_SELF"] returns /bar/foo.php. What I am looking for is a regular expression to return whatever is after the last '/', which would be the desired foo.php string.
If anyone can help me out it would be greatly appreciated.