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)