lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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