support decimal number matching

This commit is contained in:
whosit 2025-04-06 07:39:47 +03:00
parent 6c14da350b
commit f501c89a4e

View File

@ -570,9 +570,9 @@ local function add_coords_log_personal(playername, pos, message)
end end
-- Trying to mach any three integer numbers separated at least by -- Trying to mach any three real numbers separated at least by
-- spaces or punctuation. -- spaces or punctuation.
local FUZZY_COORD_PATTERN = "(%-?%d+)[%s]*[%s,;][%s]*(%-?%d+)[%s]*[%s,;][%s]*(%-?%d+)" local FUZZY_COORD_PATTERN = "(%-?%d+%.?%d*)[%s]*[%s,;][%s]*(%-?%d+%.?%d*)[%s]*[%s,;][%s]*(%-?%d+%.?%d*)"
local function fuzzy_parse_coords(str) local function fuzzy_parse_coords(str)