View Single Post
09-10-12, 02:15 AM   #2
Rochet2
A Defias Bandit
Join Date: Sep 2012
Posts: 3
I dont know if its more efficent, but this should work:
Code:
local str = "623 Shadow damage every 3.55 seconds every 3.5522seconds." -- Example
local time = tonumber(str:match("every ([%d.]+) sec"))
print(time, type(time)) -- time is nil in case no numbers or decimals or the every .. sec is not found. (even without the tonumber, but it will be in string form)
  Reply With Quote