[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: unescape lua string (opposite of %q)
- From: Ricardo Ramos Massaro <ricardo.massaro@...>
- Date: Sat, 5 Jun 2010 03:37:20 -0300
On Sat, Jun 5, 2010 at 3:18 AM, Jonathan Castello <twisolar@gmail.com> wrote:
> ----
> local input = [["line1"\nline2]]
> input = input:gsub([["]], [[\"]])
> local output = loadstring("return \"" .. input .. "\"")()
> ----
This one fails if the input contains a backslash followed by a double quote.
-Ricardo