fix the matching of negative numbers again (hopefully)

This commit is contained in:
whosit 2023-05-15 00:45:04 +03:00
parent fd520efce6
commit 83b4002aaa

View File

@ -528,7 +528,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+)[^.%d]?[%s,:;][^%d-]?(%-?%d+)[^.%d]?[%s,:;][^%d-]?(%-?%d+)"
local function fuzzy_parse_coords(str)