would somebody tell me, how to from text in variable like:
>Hello World
text,1000
text2,200
read:
1. line – if in line is > and line isn’t logner than 50 chars then read, if not – go to next line
(part of this checking is:
if string.sub(tekst, 1, 1) == '>' then
...
end
but there is nothing about checking lenght of line.
next lines – impart text by “,” and first get text from before “,” then get text from after “,” to the different vars (to analyse it by another part of script)
I’ll be very grateful
Your not entirely clear on what to do with the matched string (between > and the end of the line), as
readis kind of generic, I just put it in a table.This depends also on which character(s) represent a line ending in the string. possibilities are:
\n(UNIX, Mac, and the rest of the sane world) or\r\n(Windows)