Module:Sandbox/pppery/massrm

local p = {}; local redr = require("Module:Redirect"); function p.main(frame) local args = {} local text = frame.args.text .. '\n'; local matcher = mw.ustring.gmatch(text, "([^	\n]+)[	\n]+"); local cnt = 1; while true do		local p = matcher; if not p then if frame.args.go then return mw.dumpObject(args) end args.reason = frame.args.reason; frame = frame:newChild{title=frame.title, args=args}; frame = frame:newChild{title=frame.title, args=args}; return require("Module:Requested move").main(frame); end p = mw.ustring.gsub(p,"_"," ") local new = p:match("%((.-)%)") if new ~= p then local t = mw.title.new(p) if t.exists and not t.isRedirect then args["current" .. cnt] = p; args["new" .. cnt] = new cnt = cnt + 1 end end end end return p