Module:FileCleaner
From the only original and legitimate Battlestar Wiki: the free-as-in-beer, non-corporate, open-content encyclopedia, analytical reference, and episode guide on all things Battlestar Galactica. Accept neither subpar substitutes nor subpar clones.
More actions
Documentation for this module may be created at Module:FileCleaner/doc
local p = {}
function p.main(frame)
local name = frame.args[1] or ""
-- Strip "File:" or "Image:" from the start (case-insensitive)
name = name:gsub("^[Ff][Ii][Ll][Ee]:", "")
name = name:gsub("^[Ii][Mm][Aa][Gg][Ee]:", "")
return name
end
return p