lua-users home
lua-l archive

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


> >Anyway, I'm curious: do you have file names with say ":2012: " in them?
> 
> As I'm on Windows, the answer is "no". But in case of loadstring, there 
> may be (user supplied) strings that could just begin with ":2012: ".

I was going to suggest that parsing the error message in reverse is robust:
	message:reverse():match(" :(%d+):"):reverse()

but, no, the error message can contain that pattern:
	print(loadstring'":2012: patt"')

So, I don't see a solution. Sorry about that.