in reply to truncating urls

use a regex.
# remove anything in a line upto the last occurance of / s!^.*/!!;
use abigail's solution, I read it the other way around.
Boris