1# inspired by an autoconf generated configure script. 2s%/[^/][^/]*$%% 3s%[\/][^\/][^\/]*$%% 4s,.*[^\/],, 5