Editing Module:UtilitiesGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 216: | Line 216: | ||
if value then | if value then | ||
-- Keep only digits (0-9), plus (+), and minus (-) | -- Keep only digits (0-9), plus (+), and minus (-) | ||
value = value:gsub("[^0-9+ | value = value:gsub("[^0-9+-]", "") | ||
-- Return empty string if nothing left, otherwise return the filtered value | -- Return empty string if nothing left, otherwise return the filtered value | ||
return value ~= "" and value or variable_name | return value ~= "" and value or variable_name | ||