$string1 =~/^(\/.*\/)[^\/]*$/;
$string2 = $1;
print $string;