Module:Sandbox/Aidan9382

This is an old revision of this page, as edited by Aidan9382 (talk | contribs) at 10:14, 11 November 2022 (light erroring). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

require("strict")
local p = {}

function p.main(data)
	return "<div style=text-align:right;font-size:80%>This does nothing as of right now. "..os.time().."</div>"
end

function p.iloveregexold(data)
	local r = "%[?%[?.-:([^{|]+)%]?%]?"
	local args = {mw.ustring.match("[[File:Hey.jpg|thumb|left|250px]]",r)}
	return table.concat(args," -- ")
end
function p.iloveregex(data)
	--This assumes [[ is present, and that therefore ]] is present
	local r = "%[%[%a-:([^{|]+)(.+)%]%]"
	local args = {mw.ustring.match("[[File:Hey.jpg|thumb|left|250px|All for [[Module:Excerpt/portals]]|alt=text]]",r)}
	return table.concat(args," -- ")
end

function p:namecall()
	return self
end

return setmetatable(p,{
	__index=function(t,k)
		mw.log("Attempted to access unknown function '"..tostring(k).."'")
		return function(frame)
			return frame:preprocess("<span class='error'>Attempted to access unknown function '"..tostring(k).."'</span>")
		end
	end
})