($outer, $inner) = "/foo/bar" =~ m[(/(.+))*]; print $inner;