Module:Replace

local util_args = require('Module:ArgsUtil')

local h = {}

local p = {} function p.main(frame) local args = util_args.original if not args[2] then return args[1] end local replacement = args[1]:gsub(frame:preprocess(args[2]), args[3] or '') return replacement end return p