lua-users home
lua-l archive

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

Probably as a result of adopting a leap-frogging (instead of a thorough) approach to learning Lua, am not quite able to figure out what this segment of code does/means, and a google search didn't yeild much.

local struct = require(_NAME:match("^[^%.]+"))
local name = (...):gsub('%.[^%.]+$', '')

This is from the vstruct basic.lua example. What does the _NAME:match() do ? What does "(...):gsub(pattern...)" do ?