Module:Sandbox/ProcrastinatingReader/PageUtil

This is the current revision of this page, as edited by Legoktm (talk | contribs) at 20:58, 23 October 2022 (Replace Module:No globals with require( "strict" )). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
require('strict')

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