lua-users home
lua-l archive

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


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).