Module:Sandbox/Frietjes

This is an old revision of this page, as edited by Frietjes (talk | contribs) at 16:15, 31 January 2018. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- CFB schedule table conversion
-- {{subst:#invoke:CFB schedule/convert|table|...}}
local p = {}

function p.table(frame)
	local res = ''
	for t in mw.text.gsplit(frame.args[1] or '', '{{[_%s]*CFB[_%s]*Schedule[_%s]*') do
		t = t:match( '^%s*(.-)%s*$' )
		if mw.ustring.sub(t,-2) == '}}' then
			res = res .. 'CFB schedule ' .. mw.ustring.sub(t,1,-2) .. '\n~MARK~\n'
		end
	end
	return res
end
return p