lua-users home
lua-l archive

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


On Sun, Sep 18, 2011 at 6:07 AM, zhiguo zhao <zhaozg@gmail.com> wrote:
>> print(string.find(uri,'/([\-\+])/(.-)/(.*)'))
> stdin:1: invalid escape sequence near ''/(['

You should use % not \  - Lua string patterns are not regexes although
they are similar.

LuaJIT is more strict than Lua 5.1, so it will catch the illegal escape.

steve d.