lua-users home
lua-l archive

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


Hello All


I stumbled on the above while going through Lua manual... I need your help to here.
     x = string.gsub("4+5 = $return 4+5$", "%$(.-)%$", function (s)
           return loadstring(s)()
         end)
I am of the view that it should be,

     x = string.gsub("4+5 = $return 4+5$", "%$(.+)%$", function (s)
           return loadstring(s)()
         end)

My question is what is "-" in the above pattern?

Regards, \Emeka
Satajanus  Nig. Ltd