Module:Sandbox/test

Revision as of 11:11, 7 February 2022 by imported>MSGJ
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Sandbox/test/doc

local p = {};

function p.removeword(frame)
	local link = frame.args.link or ""
	local remove = frame.args.remove or ""
	local char1=string.sub(remove,1,1)
	local regex="%f[%w][" .. string.upper(char1) .. string.lower(char1) .. "]" .. string.sub(remove,2) .. "*%f[%W]"
	--return regex
	return (link:gsub(regex, ""))
end

return p