local _t = {}

_t.name = "Li"

_t.age = 49

local str = string.gsub("hahah---[name]----[age]--xrz-", "[%[](.-)[%]]", function(s) return tostring(_t[s]) end)

print(str)

 

好文链接

评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。