lineoffset - In Reverse

Len Morgan len-morgan at crcom.net
Tue Nov 17 09:40:08 EST 2009


I'm trying to parse a file, who's format I have no control over.  I have 
found the pattern that I need but in order to make it work (easily) I 
need the equivalent of lineoffset to work from the end mark (which I can 
reliably find) and the start of that section which is a variable number 
of lines above the end mark.

The start of a section is a line by itself with "------------..." but 
this same line is also used to mark off other sections that I don't 
need.  So, what I need to do is:

1) find the line offset to the next end-of-section marker
2) find the line offset from #1 BACKWARDS to the first line that starts 
with "------------..."

Is there such a function?  I can always roll my own and just read lines 
backwards from #1 above until I find the start mark but why reinvent the 
wheel if such a function is already in revTalk.

len



More information about the use-livecode mailing list