lua-users home
lua-l archive

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

Hello Luiz,
lstrip does the job. 

On Tue, Nov 9, 2010 at 2:34 PM, Luiz Henrique de Figueiredo <> wrote:
> is there anyone who hash a script (bash or others) that takes a .lua file
> and strips out all the comments (block, multiline, single line) ?

This is hard to do right with regular expressions. Better use the Lua lexer.
See for instance LuaSrcDiet and my lstrip: