[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: Gilles Ganault <gilles.ganault@...>
- Date: Sun, 24 Jul 2011 15:01:17 +0200
On Sun, 24 Jul 2011 14:56:24 +0200, Gilles Ganault
<gilles.ganault@free.fr> wrote:
>data = io.open("C:\places.txt","r")
Found it: blackslashes must be doubled:
==========
data = io.open("C:\\places.txt","r")
==========
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
==========