2023年政策修订增补工作正在进行中,欢迎参与!
Module:Sandbox/Hydrogina/askTable
跳转到导航
跳转到搜索
local p = {}
function p.main(frame)
local args = (frame == mw.getCurrentFrame() and frame.args) or frame
local rtn=""
s=args[1]
s=mw.text.decode(s)
--s=string.gsub(s,"|}","");
s=string.gsub(s,"<div>.-</div>","");
rows=mw.text.split(s, "|-\n" ,true)
for i = 3, #rows do
local row=rows[i]
--local cols=mw.text.split(s, "| " ,true)
--for j = 1, #cols do
-- local col=cols[i]
--end
--local col=cols[1]
local col=string.match(row, "%[%[.-%]%]")
rtn=rtn..col..","
end
--rtn=string.gsub(rtn,"<div>.-</div>","");
return rtn
end
return p