read from file until a line begins with a certain word

Matthias Rebbe matthias_livecode_150811 at m-r-d.de
Sat Sep 16 20:50:53 EDT 2017


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
+49 5741 310000
‌wirmachen.software <http://wirmachen.software/>‌




More information about the use-livecode mailing list