Jump to content

Module:Sandbox/Alex 21

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Alex 21 (talk | contribs) at 00:30, 12 January 2025. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

function p.main(frame) 
	local args = require('Module:Arguments').getArgs(frame, {frameOnly = true})
	args = args or {}
	
	args[1] = args[1]
			:gsub("%((season|series) (%d+)%)", "%1 %2")
			:gsub("%((%d+ TV series), (season|series) (%d+)%)", "(%1) %2 %3)")
			:gsub("%((.+?) (season|series) (%d+)%)", "(%1 TV series) %2 %3")
	
	return args[1]
end

return p