I'm fetching data from a file in ics format. The problem is that the file may change several times. I have this code to by in each variable each die of a certain line of the file. Example:
for line in f:lines() do
f line:sub(1,5) == "RRULE" then --objet
rule = line
freq = string.match(rule,"FREQ=(.*);")
until_ = string.match(rule,"UNTIL=(.*)")
interval = string.match(rule,"INTERVAL=(.*)")
count = string.match(rule,"COUNT=(.*)")
end
end
And here are the various examples of the file line I can get:
RRULE:FREQ=DAILY;INTERVAL=10;COUNT=5
RRULE:FREQ=DAILY;INTERVAL=2
RRULE:FREQ=DAILY;UNTIL=19971224T000000Z
How can I get to by in each different variable?