lua-users home
lua-l archive

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


> Hello,
> 
> How can I strip all control character form a string but still keeping carriage return ?
> 
> My current code is :
> 
>     string.gsub(arg[4],'%c', '?')
> 
> but even carriage returns are converted to a '?' ...

    string.gsub(arg[4],'[^%C\n]', '?')

-- Roberto