Module:DabBgone

-- This module is used to remove the part in brackets from the end of a string. -- Syntax (for use within a template): }} -- If first parameter of the parent template is unused, will return for current page

local p = {}

function p.main( frame ) local title = frame.args[1] if title == "" then title = mw.title.getCurrentTitle.text end local pattern = "%(.[^%)]*%)$"   local undabbed = string.gsub( title, pattern,"", 1 )    return undabbed end

return p