Jump to content

Module:Sandbox/MSGJ

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by MSGJ (talk | contribs) at 10:39, 22 April 2024. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
require('strict')
local p = {}

p.main = function()
	local template_code = mw.title.new('Template:WikiProject Medicine/sandbox'):getContent()
	local match = string.match(
		template_code,
		'importance' .. '%s*=%s*{{{([^|}]*)'
	)
	if not match then match = 'nil' end
	local match2 = string.match(
		template_code,
		'%|' .. 'importance' .. '%s*=%s*{{{([^|}]*)'
	)
	if not match2 then match2 = 'nil' end
	return match, match2
end

return p