read from file until a line begins with a certain word
Bob Sneidar
bobsneidar at iotecdigital.com
Mon Sep 18 10:48:18 EDT 2017
How about read for x characters, put the last line in a buffer and remove it from the read text, process the read text, read the next block, prepend the buffer line.
Bob S
> On Sep 16, 2017, at 17:50 , Matthias Rebbe via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Hi,
>
> until today i used always put URL to read a complete file into memory. But now i have to process really large text files with a size of 900 - 1500 MB.
> I know i can read a file until EOF or so.
>
> But how would i read a file until a line that starts with a certain keyword, e.g. mstart. I need to read until the line before that line which starts with mstart.
> And then read from that “mstart” line until the next line before “mstart”.
> Do i have to read line by line and check if the line starts with that keyword or is there also an other way?
>
> Maybe i am thinking to complicated.
>
> Regards,
> Matthias
>
>
>
> Matthias Rebbe
More information about the use-livecode
mailing list