be more strict about matching the coords from chat

Match 3 integer numbers separated by spaces and/or ",:;"
This commit is contained in:
whosit 2023-05-30 08:21:35 +03:00
parent c01ba435b7
commit 4004eb9ce5

View File

@ -533,8 +533,7 @@ end
-- Trying to mach any three integer numbers separated at least by
-- spaces or punctuation.
--local FUZZY_COORD_PATTERN = ".-(%d+)%D?[%s.,:;]%D?(%d+)%D?[%s.,:;]%D?(%d+)"
local FUZZY_COORD_PATTERN = "(%-?%d+)[^.%d]?[%s,:;][^%d-]?(%-?%d+)[^.%d]?[%s,:;][^%d-]?(%-?%d+)"
local FUZZY_COORD_PATTERN = "(%-?%d+)[%s]*[%s,:;][%s]*(%-?%d+)[%s]*[%s,:;][%s]*(%-?%d+)"
local function fuzzy_parse_coords(str)