Possible Duplicate:
How to get the last path in the url?
I'm not very good with regex as I haven't yet come to understand how it fully works to get the right results. I need a regex expression or php function to strip out the beginning of a url to get the last bit without the variables on it.
Input : http: // www.site.com/more/more/thepartidneed?part=Idontneed
Other Input : www.site.com/more/more/thepartineed?partidontneed
Other input : site.com/more/more/partineed
Results Desired After Stripped : "thepartineed"
Is this possible?