In the uopilot wiki I found this example:
Код
--lua
local str1 = "Координаты: X = 360, Y = 638" -- строка
local num1, num2 = string.match(str1, "(%d+)[^%d]+(%d+)") -- найти 2 числа, между числами могут присутствовать любые символы
log(num1, num2)
but, (%d+) extract the numbers and doesn't check if there's "-" sign before the found case.
Is there any other regex to use instead?
Also I'm sorry if there's already such a topic in the forum, but I can't use the search engine, because forum is mostly russian.