lua-users home
lua-l archive

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


On Wed, Jan 11, 2012 at 13:30, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Wed, Jan 11, 2012 at 11:19 AM, Galanin Mikhail <bespoleznyak@narod.ru> wrote:
>>> print('test\)')
>> stdin:1: invalid escape sequence near ''test'
>
> That seems like a valid error message - LuaJIT is more strict. Better
> to throw up your hands than continue to be wrong!

I believe that you're correct.

Note also that, AFAIR, Metalua fails on that as well, so, if just to
be more compatible, don't use invalid escape sequences in your code.

Also, I find this LJ2 feature really useful to catch bogus PCRE-isms
in Lua string patterns — caught more than one bug this way.

Alexander.