Changes
use "ugsub" rather than "gsub" as the abbreviation for mw.ustring.gsub, to make it clearer that it isn't the regular string.gsub
-- Often-used functions.
local gsub ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
end
local ret = gsubugsub(msg, '$([1-9][0-9]*)', getMessageVal)
return ret
end