Module:Sandbox/ProcrastinatingReader/PageUtil

This is an old revision of this page, as edited by ProcrastinatingReader (talk | contribs) at 16:25, 20 August 2021 (test). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
require('Module:No globals')

local p = {}

function p.getEnglishVariety(frame)
	local title = mw.title.new(frame:getParent().page)
	local matches = mw.ustring.match(title:getContent(), "{{[Uu]se (%w+) [Ee]nglish}}", 0)
	mw.logObject(matches)
	return matches[0]
end

return p