[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: maybe a regex bugs in luajit2
- From: steve donovan <steve.j.donovan@...>
- Date: Sun, 18 Sep 2011 06:35:55 +0200
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.