[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [5.1.4] "attempt to index global 'data' (a nil value)
- From: Peter Cawley <lua@...>
- Date: Sun, 24 Jul 2011 14:14:03 +0100
On Sun, Jul 24, 2011 at 2:01 PM, Gilles Ganault <gilles.ganault@free.fr> wrote:
> However, Lua doesn't print anything, although I'm sure the regex is
> correct (tested in UltraEdit):
> ==========
> for token in string.gmatch(line, '<a href="/places/.+?\.php">') do
> print(token)
> end
> ==========
Lua's string library doesn't use any kind of regex. I would guess that
the string library's .- is equivalent to the regex .+? construction,
and that %. is equivalent to \. (the latter, expressed in a string,
would also need an escaping slash).