On Mon, Jul 27, 2015 at 12:28 AM, Sean Conner <sean@conman.org> wrote: > (You may have to switch to LPEG ... ) Perhaps not. print ( ('d//'):gsub ( '([^/])/*$', '%1/' ) ) print ( ('d//'):gsub ( '/*$', '/', 1 ) ) -Parke