Jump to content

Module:Strip to numbers

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by SMcCandlish (talk | contribs) at 07:29, 18 July 2015 (undesirable result (the escape codes have numbers in them)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}
function p.main(frame)
	local theString = frame.args[1]
	local onlyNumbers
	onlyNumbers = (string.gsub(theString, "[^%d%.-]", ""))
	return onlyNumbers
end

return p