in reply to Regex question

besides the regex solutions above, if ikegami's assumption is right that you just want the last thing between two slashes you can also use split instead of a direct regex...
$s="http://blah/foo/stuff/more.txt"; print +(split('/',$s))[-2]; # stuff